/* Custom styles for Bookkeeper */
#sidebar-container {
    width: 16rem; /* w-64 equivalent */
    flex-shrink: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #6b7280;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
    font-weight: 500;
    width: 100%;
}

.nav-link:hover {
    background: #f3f4f6;
    color: #3b82f6;
}

.nav-link.active {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: white;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    background: white;
    color: #374151;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
}

.btn-secondary:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-pending {
    background: #fef3c7;
    color: #92400e;
}

.badge-paid {
    background: #d1fae5;
    color: #065f46;
}

.badge-sales {
    background: #dbeafe;
    color: #1e40af;
}

.badge-purchase {
    background: #fce7f3;
    color: #9f1239;
}

.badge-credit {
    background: #d1fae5;
    color: #065f46;
}

.badge-debit {
    background: #fee2e2;
    color: #991b1b;
}

.badge-unmatched {
    background: #fef3c7;
    color: #92400e;
}

.badge-matched, .badge-settled {
    background: #d1fae5;
    color: #065f46;
}

/* Upload area */
.upload-area {
    border: 3px dashed #cbd5e1;
    border-radius: 16px;
    padding: 48px;
    text-align: center;
    background: linear-gradient(to bottom, #f8fafc, #f1f5f9);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.upload-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(99, 102, 241, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.upload-area:hover {
    border-color: #3b82f6;
    background: linear-gradient(to bottom, #eff6ff, #dbeafe);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.15);
}

.upload-area:hover::before {
    opacity: 1;
}

.upload-area.dragover {
    border-color: #3b82f6;
    background: linear-gradient(to bottom, #dbeafe, #bfdbfe);
    transform: scale(1.01);
    box-shadow: 0 15px 35px rgba(59, 130, 246, 0.25);
}

.upload-area.dragover::before {
    opacity: 1;
}

/* Table styles */
/* AG Grid Clean Styling - Matching AG Grid Website Aesthetic */
.ag-theme-alpine {
    --ag-header-background-color: #ffffff;
    --ag-header-foreground-color: #1f2937;
    --ag-border-color: #e5e7eb;
    --ag-row-hover-color: #f9fafb;
    --ag-selected-row-background-color: #eff6ff;
    --ag-font-size: 14px;
    --ag-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --ag-odd-row-background-color: #ffffff;
    --ag-row-background-color: #ffffff;
    --ag-header-cell-hover-background-color: #f9fafb;
    --ag-header-cell-moving-background-color: #f3f4f6;
}

.ag-theme-alpine .ag-header-cell {
    font-weight: 600;
    font-size: 13px;
    text-transform: none;
    letter-spacing: 0.01em;
    color: #374151;
}

.ag-theme-alpine .ag-header-cell-text {
    color: #1f2937;
}

.ag-theme-alpine .ag-cell {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    color: #1f2937;
    line-height: 1.5;
}

.ag-theme-alpine .ag-row {
    border-bottom: 1px solid #f3f4f6;
}

.ag-theme-alpine .ag-row:hover {
    background-color: #f9fafb;
}

.ag-theme-alpine .ag-paging-panel {
    border-top: 1px solid #e5e7eb;
    padding: 12px 16px;
    background-color: #ffffff;
    color: #6b7280;
    font-size: 13px;
}

.ag-theme-alpine .ag-paging-button {
    color: #6b7280;
}

.ag-theme-alpine .ag-paging-button:hover {
    background-color: #f3f4f6;
    color: #1f2937;
}

.ag-theme-alpine .ag-icon {
    color: #6b7280;
}

.ag-theme-alpine .ag-filter-toolpanel-header,
.ag-theme-alpine .ag-filter-toolpanel-search {
    background-color: #ffffff;
}

.table-container {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table thead {
    background: #f9fafb;
}

table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7280;
    border-bottom: 1px solid #e5e7eb;
}

table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f3f4f6;
}

table tbody tr:hover {
    background: #f9fafb;
}

/* Form styles */
.form-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Modal styles */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 24px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}
