/* Dashboard Styles */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    overflow-x: hidden;
}

.dashboard-body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Header Styles */
.dashboard-header {
    background-color: var(--header-bg);
    box-shadow: 0 3px 10px var(--shadow-color);
    padding: 0.5rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1100;
    width: 100%;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Enhanced Sidebar Toggle */
.sidebar-toggle {
    display: block;
    background-color: var(--light-accent);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    width: 40px;
    height: 36px;
    padding: 6px;
    position: relative;
    z-index: 110;
    margin-right: 15px;
    transition: transform 0.3s;
}

.sidebar-toggle:hover {
    background-color: var(--hover-bg);
}

.sidebar-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--text-color);
    margin-bottom: 6px;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.sidebar-toggle span:last-child {
    margin-bottom: 0;
}

/* Toggle active state */
.sidebar-toggle.active {
    background-color: var(--hover-bg);
}

.sidebar-toggle.active span:first-child {
    transform: rotate(45deg) translate(5px, 5px);
}

.sidebar-toggle.active span:nth-child(2) {
    opacity: 0;
}

.sidebar-toggle.active span:last-child {
    transform: rotate(-45deg) translate(6px, -6px);
}

#sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    cursor: pointer;
}

#sidebar-overlay.active {
    display: block;
}

.header-logo {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.header-logo h1 {
    font-size: 28px;
    margin: 0;
}

.header-logo p {
    font-size: 14px;
    letter-spacing: 4px;
    margin: 0;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

#username-display {
    font-weight: 500;
    color: var(--text-color);
}

.logout-btn {
    background-color: transparent;
    color: var(--gold-primary);
    padding: 0.5rem 1rem;
    border: 1px solid var(--gold-primary);
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background-color: var(--gold-primary);
    color: white;
}

/* Dashboard Layout */
.dashboard-container {
    display: flex;
    flex: 1;
    overflow: hidden;
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: 0;
    left: -250px; /* Start off-screen */
    height: 100vh;
    width: 250px;
    background-color: var(--card-bg);
    transition: transform 0.3s ease;
    z-index: 1000;
    padding-top: 60px; /* Space for header */
    overflow-y: auto;
    color: var(--text-color);
    box-shadow: 3px 0 10px var(--shadow-color);
    border-right: 1px solid var(--border-color);
}

.sidebar.active {
    transform: translateX(250px); /*slide in*/
}

.sidebar nav {
    padding: 1rem 0;
}

.sidebar nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar nav li {
    margin-bottom: 5px;
}

.sidebar nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.sidebar nav a:hover {
    background-color: var(--hover-bg);
    border-left-color: var(--gold-secondary);
}

.sidebar nav li.active a {
    background-color: var(--hover-bg);
    border-left-color: var(--gold-primary);
    font-weight: 600;
}

.sidebar .icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.main-content {
    flex: 1;
    padding: 2rem;
    margin-left: 0;
    transition: margin-left 0.3s ease;
    overflow-y: auto;
    background-color: var(--bg-color);
}

.main-content h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 30px;
    position: relative;
    color: var(--text-color);
    padding-bottom: 15px;
}

.main-content h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--gold-primary), var(--gold-secondary));
    border-radius: 3px;
}

/* Dashboard Content Sections */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.card {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 12px var(--shadow-color);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(to bottom, var(--gold-primary), var(--gold-secondary));
    border-radius: 10px 0 0 10px;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px var(--shadow-color);
}

.card-content {
    padding-left: 10px;
}

.card h3 {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-weight: 600;
}

.card-value {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-color);
    background: linear-gradient(90deg, var(--gold-primary), var(--gold-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.card-comparison, .card-count {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 5px;
}

.card-action {
    margin-top: 15px;
    display: flex;
    justify-content: flex-end;
}

.view-all {
    font-size: 14px;
    color: var(--gold-primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    font-weight: 500;
    transition: all 0.3s ease;
}

.view-all:hover {
    color: var(--gold-secondary);
    text-decoration: underline;
}

.view-all::after {
    content: "➔";
    display: inline-block;
    margin-left: 5px;
    font-size: 14px;
    transition: transform 0.3s ease;
}

.view-all:hover::after {
    transform: translateX(3px);
}

.chart-section {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px var(--shadow-color);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    color: var(--text-color);
}

.chart-controls {
    display: flex;
    gap: 10px;
}

.btn-small {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 4px;
    padding: 5px 12px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-small:hover {
    border-color: var(--gold-primary);
}

.btn-small.active {
    background-color: var(--gold-primary);
    border-color: var(--gold-primary);
    color: white;
}

.chart-container {
    height: 300px;
    width: 100%;
}

.activity-section {
    margin-bottom: 2rem;
}

.activity-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.activity-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 12px var(--shadow-color);
}

.activity-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    color: var(--text-color);
}

.activity-card h3::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--gold-primary), var(--gold-secondary));
    border-radius: 3px;
}

.invoice-list, .birthday-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.invoice-list li, .birthday-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.invoice-list li:last-child, .birthday-list li:last-child {
    border-bottom: none;
}

.no-data {
    text-align: center;
    padding: 20px 0;
    color: var(--text-secondary);
    font-style: italic;
}

.invoice-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.invoice-info {
    flex: 1;
}

.invoice-customer {
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 5px;
}

.invoice-date {
    font-size: 12px;
    color: var(--text-secondary);
}

.invoice-amount {
    font-weight: 600;
    color: var(--gold-primary);
}

.birthday-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.customer-info {
    flex: 1;
}

.customer-name {
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 5px;
}

.birthday-date {
    font-size: 12px;
    color: var(--text-secondary);
}

.call-btn {
    background-color: var(--light-accent);
    color: var(--gold-primary);
    border: none;
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.call-btn:hover {
    background-color: var(--gold-primary);
    color: white;
}

.quick-actions {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px var(--shadow-color);
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 20px;
}

.action-btn {
    background-color: var(--light-accent);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.action-btn:hover {
    background-color: var(--hover-bg);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px var(--shadow-color);
}

.action-btn .icon {
    font-size: 24px;
    color: var(--gold-primary);
}

.action-btn span {
    font-weight: 500;
    color: var(--text-color);
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    max-width: 350px;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1200;
    display: flex;
    align-items: center;
    animation: slideIn 0.3s forwards;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.notification.error {
    background-color: #fff8f8;
    border-left: 4px solid #e74c3c;
}

.notification p {
    margin: 0;
    font-size: 14px;
    color: #333;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 16px;
    color: #999;
    cursor: pointer;
}

/* Responsive Adjustments */
/* Large screens breakpoint */
@media (max-width: 1200px) {
    .dashboard-container,
    .header-content {
        max-width: 100%;
        padding: 0 1rem;
    }
    
    .main-content {
        padding: 1.5rem 1rem;
    }
    
    .summary-cards {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }
}

/* Medium screens - tablet breakpoint */
@media (max-width: 992px) {
    .header-logo h1 {
        font-size: 24px;
    }
    
    .header-logo p {
        font-size: 12px;
    }
    
    .sidebar {
        width: 220px;
    }
    
    .sidebar .icon {
        font-size: 1rem;
    }
    
    .activity-container {
        grid-template-columns: 1fr;
    }
    
    .main-content h1 {
        font-size: 1.5rem;
    }
}

/* Small screens - mobile breakpoint */
@media (max-width: 768px) {
    .sidebar-toggle {
        display: block;
    }
    
    .dashboard-header {
        padding: 0.5rem 1rem;
    }
    
    .header-content {
        padding: 0;
    }
    
    .sidebar {
        width: 250px;
        left: -250px;
    }
    
    .sidebar.active {
        transform: translateX(250px);
    }
    
    .main-content {
        margin-left: 0 !important;
        padding: 1.25rem 1rem;
    }
    
    #sidebar-overlay.active {
        display: block;
    }
}

@media (max-width: 480px) {
    .header-logo p {
        display: none;
    }
    
    .logout-btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.85rem;
    }
    
    .main-content {
        padding: 1rem 0.75rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .chart-controls {
        width: 100%;
        justify-content: space-between;
    }
    
    .card-content {
        padding: 1.25rem;
    }
    
    .activity-card {
        padding: 1.25rem;
    }
}

/* Dashboard and App Layout Styles */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
}

.header-center h1 {
    margin: 0;
    font-size: 1.5rem;
    color: #333;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #b8860b;
    text-decoration: none;
    font-weight: 500;
}

.back-btn:hover {
    text-decoration: underline;
}

.app-content {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

/* Summary Cards */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.card-title {
    font-size: 16px;
    color: #666;
    margin: 0;
}

.card-icon {
    width: 40px;
    height: 40px;
    background-color: rgba(184, 134, 11, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b8860b;
}

.card-value {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 0 0 5px 0;
}

.card-comparison {
    font-size: 14px;
    color: #888;
}

/* Chart Section */
.chart-section {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 30px;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.chart-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.chart-controls {
    display: flex;
    gap: 10px;
}

.chart-controls button {
    padding: 8px 12px;
    background-color: #f5f5f5;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.chart-controls button.active {
    background-color: #b8860b;
    color: white;
}

.chart-container {
    height: 300px;
    position: relative;
}

/* Widgets */
.widgets-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.widget {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.widget-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.widget-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget-list li {
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.widget-list li:last-child {
    border-bottom: none;
}

.invoice-item, .birthday-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.invoice-info, .customer-info {
    display: flex;
    flex-direction: column;
}

.invoice-customer, .customer-name {
    font-weight: 500;
    color: #333;
}

.invoice-date, .birthday-date {
    font-size: 12px;
    color: #888;
    margin-top: 3px;
}

.invoice-amount {
    font-weight: 500;
    color: #333;
}

.call-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #4CAF50;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.call-btn:hover {
    background-color: #45a049;
}

.no-data {
    color: #888;
    text-align: center;
    padding: 15px 0;
}

/* Loading Spinner */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(184, 134, 11, 0.1);
    border-radius: 50%;
    border-top: 4px solid #b8860b;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Pending Balances Page Specific Styles */
.actions-bar {
    margin-bottom: 20px;
    display: flex;
    justify-content: flex-end;
}

.filter-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.search-box {
    display: flex;
    gap: 5px;
}

.search-box input {
    width: 250px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.search-box button {
    padding: 8px 15px;
    background-color: #b8860b;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.filter-options select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
}

.table-container {
    overflow-x: auto;
}

.loading-row {
    text-align: center;
    padding: 20px;
    color: #888;
}

.error {
    color: #f44336;
    text-align: center;
    padding: 15px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .filter-bar {
        flex-direction: column;
    }
    
    .search-box {
        width: 100%;
    }
    
    .search-box input {
        flex-grow: 1;
    }
    
    .filter-options {
        width: 100%;
    }
    
    .filter-options select {
        width: 100%;
    }
}

/* Today's Payments Styling - Enhanced */
.today-payments-section {
    margin-bottom: 30px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    padding: 20px;
    border: 1px solid var(--border-light);
}

.section-header {
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.section-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.section-header h2 {
    font-size: 20px;
    color: #333;
    margin-bottom: 5px;
    margin-top: 0;
}

.section-description {
    color: #666;
    font-size: 14px;
    margin-top: 0;
    margin-bottom: 0;
}

.secondary-btn.small {
    padding: 6px 12px;
    font-size: 13px;
    background-color: #f1f1f1;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
}

.secondary-btn.small:hover {
    background-color: #e5e5e5;
}

.today-payments-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

.payment-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid var(--border-light);
    position: relative;
}

.payment-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(to bottom, var(--green), #219653);
    border-radius: 8px 0 0 8px;
}

.payment-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}

.payment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background-color: #f8f9fa;
    border-bottom: 1px solid var(--border-light);
}

.payment-details {
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.payment-time {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #666;
    font-size: 14px;
}

.payment-method {
    font-size: 12px;
    color: #888;
    margin-top: 5px;
}

.amount-badge.success {
    background-color: var(--green);
    color: white;
    padding: 4px 10px;
    border-radius: 16px;
    font-weight: 600;
    font-size: 14px;
}

.section-footer {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-light);
    text-align: right;
}

.summary-text {
    font-size: 15px;
    color: #666;
}

.summary-text span {
    font-weight: 600;
    color: var(--green);
}

.loading-skeleton .payment-card.skeleton {
    height: 100px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.no-payments-message {
    padding: 20px;
    text-align: center;
    color: #666;
    background-color: #f9f9f9;
    border-radius: 8px;
    font-style: italic;
} 