/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: 
        radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(248, 165, 95, 0.05) 0%, transparent 50%),
        #f7f3e9; /* Cream background with subtle patterns */
    background-attachment: fixed;
    min-height: 100vh;
    color: #2c2c2c;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Mobile-first responsive design */
@media (max-width: 768px) {
    body {
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

/* Login Page Styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    width: 100%;
    text-align: center;
}

.logo h1 {
    color: #444445;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.logo p {
    color: #444445;
    font-size: 1rem;
    margin-bottom: 30px;
    opacity: 0.8;
}

.login-form {
    text-align: left;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #444445;
    font-weight: 600;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #F8A55F;
    box-shadow: 0 0 0 3px rgba(0, 112, 192, 0.1);
}

.login-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #444445 0%, #F8A55F 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 112, 192, 0.3);
}

.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.loading-spinner {
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 2px solid white;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-message {
    background: #fed7d7;
    color: #c53030;
    padding: 10px;
    border-radius: 8px;
    margin-top: 15px;
    text-align: center;
    border: 1px solid #feb2b2;
}

/* Dashboard Styles */
.dashboard-container {
    min-height: 100vh;
    background: transparent; /* Let body background show through */
}

.header {
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.header-title {
    color: #444445;
    font-size: 1.8rem;
    font-weight: 700;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #444445;
}

.profile-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #444445 0%, #F8A55F 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s;
}

.profile-icon:hover {
    transform: scale(1.1);
}

.logout-btn {
    padding: 8px 16px;
    background: #e53e3e;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.logout-btn:hover {
    background: #c53030;
}

.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.welcome-section {
    text-align: center;
    margin-bottom: 50px;
}

.welcome-section h2 {
    color: #444445;
    font-size: 2rem;
    margin-bottom: 10px;
}

.welcome-section p {
    color: #444445;
    font-size: 1.1rem;
    opacity: 0.8;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 40px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.dashboard-card {
    /* Glassmorphism effect for light mode */
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08), 0 5px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
    height: 280px !important;
    min-height: 280px !important;
    max-height: 280px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    position: relative;
}

/* Add subtle glassmorphism enhancement */
.dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 50%, rgba(255, 255, 255, 0.1) 100%);
    border-radius: 20px;
    pointer-events: none;
    z-index: 1;
}

.dashboard-card > * {
    position: relative;
    z-index: 2;
}

.dashboard-card:hover {
    transform: translateY(-8px) scale(1.02);
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(25px) saturate(200%);
    -webkit-backdrop-filter: blur(25px) saturate(200%);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.12), 0 10px 25px rgba(0, 0, 0, 0.08);
    border-color: rgba(248, 165, 95, 0.4);
}

.card-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #444445 0%, #F8A55F 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 2rem;
    color: white;
    flex-shrink: 0;
}

.card-title {
    color: #444445;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 10px;
    flex-shrink: 0;
}

.card-description {
    color: #444445;
    line-height: 1.5;
    font-size: 0.95rem;
    flex-grow: 1;
    display: flex;
    align-items: center;
    opacity: 0.8;
}

/* Form Styles */
.form-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.form-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.form-title {
    color: #4a5568;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 30px;
    text-align: center;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s;
    font-family: inherit;
}

.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #444445 0%, #F8A55F 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 112, 192, 0.3);
}

.btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.btn-secondary:hover {
    background: #cbd5e0;
}

.btn-success {
    background: #48bb78;
    color: white;
}

.btn-success:hover {
    background: #38a169;
    transform: translateY(-2px);
}

.btn-danger {
    background: #e53e3e;
    color: white;
}

.btn-danger:hover {
    background: #c53030;
    transform: translateY(-2px);
}

/* Profile Page Styles */
.profile-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.profile-header {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    text-align: center;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 auto 20px;
}

.requests-section {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.requests-title {
    color: #4a5568;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.request-item {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s;
}

.request-item:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.request-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 10px;
}

.request-type {
    font-weight: 600;
    color: #4a5568;
    font-size: 1.1rem;
}

.request-date {
    color: #718096;
    font-size: 0.9rem;
}

.request-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-pending {
    background: #fef5e7;
    color: #d69e2e;
}

.status-approved {
    background: #f0fff4;
    color: #38a169;
}

.status-rejected {
    background: #fed7d7;
    color: #e53e3e;
}

.status-paid {
    background: #ebf8ff;
    color: #444445;
}


.requests-grid {
    display: grid;
    gap: 20px;
}

.request-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #667eea;
    overflow: hidden;
    word-wrap: break-word;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.request-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.meta-item {
    display: flex;
    flex-direction: column;
}

.meta-label {
    color: #718096;
    font-size: 0.85rem;
    margin-bottom: 5px;
    text-transform: uppercase;
    font-weight: 600;
}

.meta-value {
    color: #4a5568;
    font-weight: 600;
    word-break: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.request-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
    margin-top: 15px;
}

/* Request card content sections */
.request-card .comments-section {
    margin-top: 15px;
    padding: 15px;
    background: #fff3cd;
    border-radius: 8px;
    border-left: 4px solid #ffc107;
    word-break: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    box-sizing: border-box;
}

.request-card .comments-section p {
    margin: 5px 0;
    word-break: break-word;
    overflow-wrap: break-word;
    line-height: 1.4;
}

.request-card .items-section {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    word-break: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    box-sizing: border-box;
}

.request-card .items-section ul {
    margin: 10px 0;
    padding-left: 20px;
    word-break: break-word;
    overflow-wrap: break-word;
}

.request-card .items-section li {
    margin: 5px 0;
    word-break: break-word;
    overflow-wrap: break-word;
    line-height: 1.4;
}

/* Force button visibility - Override any potential hiding */
.request-actions {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 1 !important;
    position: relative;
}

.request-actions .btn {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative;
    z-index: 2;
}

/* Ensure proper spacing for all request card elements */
.request-card > * {
    margin-bottom: 0;
}

.request-card > *:not(:last-child) {
    margin-bottom: 15px;
}

/* ========== COMPACT EXPANDABLE CARD DESIGN ========== */

/* Compact card layout */
.request-card {
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.request-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.request-card.expanded {
    transform: none;
    cursor: default;
}

/* Card header - always visible */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.card-title {
    margin: 0;
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
}

.card-id {
    color: #666;
    font-size: 0.85rem;
    margin-top: 2px;
}

/* Compact info - always visible */
.card-compact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.compact-item {
    display: flex;
    flex-direction: column;
}

.compact-label {
    color: #718096;
    font-size: 0.8rem;
    margin-bottom: 3px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.compact-value {
    color: #4a5568;
    font-weight: 600;
    word-break: break-word;
}

/* Expandable content - hidden by default */
.card-expandable-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}

.request-card.expanded .card-expandable-content {
    max-height: 2000px;
    opacity: 1;
    margin-top: 20px;
}

/* Expand indicator */
.expand-indicator {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #f8f9fa;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #666;
    font-size: 0.9rem;
}

.request-card:hover .expand-indicator {
    background: #F8A55F;
    color: white;
}

.request-card.expanded .expand-indicator {
    transform: rotate(180deg);
    background: #28a745;
    color: white;
}

/* Hide action buttons in collapsed state */
.request-card:not(.expanded) .request-actions {
    display: none !important;
}

/* Show action buttons only in expanded state */
.request-card.expanded .request-actions {
    display: flex !important;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
}

/* Collapse button in expanded view */
.collapse-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.collapse-btn:hover {
    background: #495057;
    transform: scale(1.1);
}

/* Mobile adaptations for compact cards */
@media (max-width: 768px) {
    .card-compact-info {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .expand-indicator {
        right: 15px;
        top: 15px;
    }
    
    .collapse-btn {
        right: 10px;
        top: 10px;
    }
}

/* ========== DETAILED ITEMS POPUP MODAL ========== */

.items-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.items-popup-content {
    background: white;
    border-radius: 15px;
    max-width: 90vw;
    max-height: 85vh;
    width: 800px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

.items-popup-header {
    background: linear-gradient(135deg, #444445 0%, #28a745 100%);
    color: white;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 15px 15px 0 0;
}

.items-popup-header h3 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
}

.items-popup-close {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s;
}

.items-popup-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.items-popup-body {
    padding: 0;
    max-height: calc(85vh - 140px);
    overflow-y: auto;
}

/* Request summary section */
.request-summary {
    padding: 25px;
    background: #f8f9fa;
    border-bottom: 1px solid #e2e8f0;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.summary-item {
    text-align: center;
    padding: 15px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.summary-label {
    font-size: 0.85rem;
    color: #718096;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.summary-value {
    font-size: 1.2rem;
    font-weight: bold;
    color: #2d3748;
}

/* Items table */
.items-table-container {
    padding: 25px;
}

.items-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.items-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.items-table th,
.items-table td {
    padding: 15px 12px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.items-table th {
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.items-table tbody tr:hover {
    background: #f7fafc;
}

.items-table tbody tr:nth-child(even) {
    background: #f9f9f9;
}

.items-table tbody tr:nth-child(even):hover {
    background: #f1f5f9;
}

/* Amount formatting in table */
.amount-cell {
    font-weight: 600;
    color: #2d3748;
    text-align: right;
}

.currency-usd {
    color: #059669;
}

.currency-iqd {
    color: #dc2626;
}

/* Total row styling */
.total-row {
    background: #f0f9ff !important;
    border-top: 2px solid #444445;
    font-weight: bold;
}

.total-row td {
    padding: 18px 12px;
    font-size: 1.1rem;
}

/* Mobile responsive table */
@media (max-width: 768px) {
    .items-popup-content {
        width: 95vw;
        max-height: 90vh;
    }
    
    .items-popup-header {
        padding: 15px 20px;
    }
    
    .items-popup-header h3 {
        font-size: 1.1rem;
    }
    
    .items-table-container {
        padding: 15px;
        overflow-x: auto;
    }
    
    .items-table {
        min-width: 600px;
        font-size: 0.9rem;
    }
    
    .items-table th,
    .items-table td {
        padding: 10px 8px;
    }
    
    .summary-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .request-summary {
        padding: 20px;
    }
}

/* Enhanced action buttons in expanded cards */
.request-card.expanded .request-actions {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-top: 25px;
}

.request-card.expanded .request-actions .btn {
    min-height: 45px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.request-card.expanded .request-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* View items button styling */
.view-items-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 15px 0;
}

.view-items-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    /* Mobile request actions styling */
    .request-actions {
        flex-direction: column;
        gap: 8px;
        margin-top: 20px;
        display: flex !important;
        visibility: visible !important;
    }
    
    .request-actions .btn {
        width: 100%;
        justify-content: center;
        min-height: 44px;
        font-size: 14px;
        display: flex !important;
        align-items: center;
        gap: 8px;
    }
    
    /* Ensure action buttons are touch-friendly */
    .request-card .btn {
        padding: 12px 16px;
        border-radius: 8px;
    }
    
    /* Ensure request cards don't have overflow issues on mobile */
    .request-card {
        margin-bottom: 20px;
        width: 100%;
        max-width: none;
        overflow: visible;
    }
    
    .request-meta {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 10px;
    }
}

/* Enhanced Accessibility Styles */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus indicators for accessibility */
.btn:focus,
input:focus,
select:focus,
textarea:focus,
button:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Enhanced button states */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn.loading {
    position: relative;
    pointer-events: none;
}

.btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 2px solid white;
    animation: spin 1s linear infinite;
}

/* Connection status styles */
.connection-status {
    transition: all 0.3s ease;
}

/* Password toggle button */
.password-toggle {
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: #4a5568 !important;
}

.password-toggle:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Field error styles */
.field-error {
    font-size: 0.875rem;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.field-error::before {
    content: '⚠';
    color: #e53e3e;
}

/* Enhanced modal styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    border-radius: 15px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    padding: 25px 30px 15px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: #4a5568;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #718096;
    cursor: pointer;
    padding: 5px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: #f7fafc;
    color: #4a5568;
}

.modal-body {
    padding: 20px 30px 30px;
}

/* Enhanced notification badge */
.notification-badge {
    background: #e53e3e;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.75rem;
    font-weight: bold;
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 18px;
    text-align: center;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.notification-btn {
    position: relative;
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #718096;
    cursor: pointer;
    padding: 8px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.notification-btn:hover {
    background: #f7fafc;
    color: #4a5568;
}

/* Enhanced balance display */
.balance-display {
    transition: all 0.3s ease;
}

/* ========== UNIVERSAL 3-COLUMN DASHBOARD LAYOUT ========== */

/* Global dashboard grid styling - applies to all pages */
.dashboard-grid,
.stats-grid,
.cards-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 30px !important;
    margin-bottom: 40px !important;
    max-width: 1400px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 0 20px;
}

/* Requests grid uses single column layout for expandable cards */
.requests-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 40px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
}

/* Universal card styling for consistent appearance */
.dashboard-card,
.stat-card,
.info-card {
    background: white !important;
    border-radius: 20px !important;
    padding: 30px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
    text-align: center !important;
    cursor: pointer !important;
    transition: all 0.3s !important;
    border: 2px solid transparent !important;
    height: 280px !important;
    min-height: 280px !important;
    max-height: 280px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.dashboard-card:hover,
.stat-card:hover,
.info-card:hover {
    transform: translateY(-10px) !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15) !important;
    border-color: #F8A55F !important;
}

/* Request cards use the compact expandable design - exempt from universal rules */
.request-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #667eea;
    overflow: hidden;
    word-wrap: break-word;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    /* Override any universal card height restrictions for expandable cards */
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
}

/* Responsive adjustments for universal layout */
@media (min-width: 769px) and (max-width: 1024px) {
    .dashboard-grid,
    .stats-grid,
    .cards-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 25px !important;
        padding: 0 15px;
    }
    
    .requests-grid {
        padding: 0 15px;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .dashboard-grid,
    .admin-grid,
    .stats-grid,
    .cards-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px !important;
        padding: 0 15px;
    }
    
    .requests-grid {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .dashboard-grid,
    .admin-grid,
    .stats-grid,
    .cards-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
        padding: 0 10px;
    }
    
    .requests-grid {
        padding: 0 10px;
    }
    
    .dashboard-card,
    .admin-card,
    .stat-card,
    .info-card {
        height: auto !important;
        min-height: 200px !important;
        max-height: none !important;
        padding: 20px !important;
    }
}

/* ========== COMPREHENSIVE MOBILE RESPONSIVE STYLES ========== */

/* Enhanced Mobile Responsive Design */
@media (max-width: 480px) {
    /* Mobile layout adjustments */
    body {
        font-size: 14px;
    }
    
    .header-content {
        padding: 0 15px;
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .header-title {
        font-size: 1.4rem;
    }
    
    .header-actions {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }
    
    .user-info {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .main-content {
        padding: 20px 15px;
    }
    
    .welcome-section h2 {
        font-size: 1.5rem;
    }
    
    .welcome-section p {
        font-size: 1rem;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .dashboard-card {
        padding: 20px;
        height: auto !important;
        min-height: 200px !important;
        max-height: none !important;
    }
    
    .card-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .card-title {
        font-size: 1.2rem;
    }
    
    .card-description {
        font-size: 0.9rem;
    }
    
    /* Form adjustments */
    .form-container {
        padding: 15px;
    }
    
    .form-card {
        padding: 20px;
        border-radius: 15px;
    }
    
    .form-title {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 15px;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn {
        width: 100%;
        padding: 15px;
        font-size: 16px;
    }
    
    /* Modal adjustments */
    .modal-content {
        width: 95%;
        margin: 20px;
        max-height: 85vh;
    }
    
    .modal-header {
        padding: 20px;
    }
    
    .modal-header h3 {
        font-size: 1.3rem;
    }
    
    .modal-body {
        padding: 20px;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    /* Tablet layout adjustments */
    .header-content {
        padding: 0 20px;
    }
    
    .main-content {
        padding: 30px 20px;
    }
    
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 25px;
    }
    
    .dashboard-card {
        padding: 25px;
    }
    
    .form-card {
        padding: 30px;
    }
    
    .form-row {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    /* Desktop small layout adjustments */
    .dashboard-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 25px;
    }
}

/* Touch-friendly improvements */
@media (pointer: coarse) {
    .btn,
    .dashboard-card,
    .request-item,
    .profile-icon,
    .notification-btn {
        min-height: 44px; /* Minimum touch target size */
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        min-height: 44px;
    }
    
    .close-btn {
        min-width: 44px;
        min-height: 44px;
    }
}

/* Landscape orientation adjustments */
@media screen and (orientation: landscape) and (max-height: 600px) {
    .header {
        padding: 10px 0;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .welcome-section {
        margin-bottom: 30px;
    }
    
    .modal-content {
        max-height: 80vh;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .card-icon,
    .profile-icon {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Accessibility improvements for mobile */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark mode support for mobile */
@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
    }
    
    /* Add dark mode styles if needed */
}

/* Print styles */
@media print {
    .header,
    .btn,
    .logout-btn,
    .notification-btn {
        display: none !important;
    }
    
    .dashboard-container,
    .form-card {
        background: white !important;
        box-shadow: none !important;
    }
    
    .dashboard-card {
        break-inside: avoid;
    }
}

/* Enhanced table responsiveness */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .table-responsive table {
        font-size: 14px;
    }
    
    .table-responsive th,
    .table-responsive td {
        padding: 8px 6px;
        white-space: nowrap;
    }
}

/* Mobile-specific utility classes */
.mobile-only {
    display: none;
}

.desktop-only {
    display: block;
}

@media (max-width: 768px) {
    .mobile-only {
        display: block;
    }
    
    .desktop-only {
        display: none;
    }
    
    .mobile-stack {
        flex-direction: column !important;
    }
    
    .mobile-center {
        text-align: center !important;
    }
    
    .mobile-hide {
        display: none !important;
    }
    
    .mobile-full-width {
        width: 100% !important;
    }
}

/* Loading states for mobile */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner-large {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #0070C0;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Enhanced focus states for mobile */
@media (max-width: 768px) {
    .btn:focus,
    input:focus,
    select:focus,
    textarea:focus,
    button:focus {
        outline: 3px solid #0070C0;
        outline-offset: 2px;
    }
}

/* ========== TABLE AND DATA DISPLAY MOBILE OPTIMIZATION ========== */

/* Responsive table wrapper */
.table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}

/* Base table styles */
table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 14px;
}

table th,
table td {
    padding: 12px 8px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
}

table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #4a5568;
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Mobile table optimizations */
@media (max-width: 768px) {
    .table-container {
        margin: 15px -15px; /* Extend to edges on mobile */
        border-radius: 0;
        box-shadow: none;
        border-top: 1px solid #e2e8f0;
        border-bottom: 1px solid #e2e8f0;
    }
    
    table {
        font-size: 12px;
        min-width: 600px; /* Ensure horizontal scrolling */
    }
    
    table th,
    table td {
        padding: 8px 6px;
        white-space: nowrap;
    }
    
    /* Highlight important columns */
    table th:first-child,
    table td:first-child {
        position: sticky;
        left: 0;
        background: white;
        z-index: 11;
        box-shadow: 2px 0 4px rgba(0, 0, 0, 0.1);
    }
    
    table th:first-child {
        background: #f8f9fa;
        z-index: 12;
    }
}

@media (max-width: 480px) {
    table {
        font-size: 11px;
        min-width: 500px;
    }
    
    table th,
    table td {
        padding: 6px 4px;
    }
}

/* Card-based alternative for complex tables on mobile */
.mobile-card-list {
    display: none;
}

@media (max-width: 768px) {
    .mobile-card-list {
        display: block;
    }
    
    .hide-on-mobile {
        display: none;
    }
    
    .data-card {
        background: white;
        border: 1px solid #e2e8f0;
        border-radius: 10px;
        padding: 15px;
        margin-bottom: 15px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
    
    .data-card-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 12px;
        padding-bottom: 8px;
        border-bottom: 1px solid #f1f5f9;
    }
    
    .data-card-title {
        font-weight: 600;
        color: #1a202c;
        font-size: 16px;
        margin: 0;
    }
    
    .data-card-meta {
        font-size: 12px;
        color: #718096;
    }
    
    .data-card-body {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 12px;
    }
    
    .data-field {
        display: flex;
        flex-direction: column;
    }
    
    .data-field-label {
        font-size: 11px;
        color: #718096;
        text-transform: uppercase;
        font-weight: 600;
        margin-bottom: 4px;
        letter-spacing: 0.5px;
    }
    
    .data-field-value {
        font-size: 14px;
        color: #2d3748;
        font-weight: 500;
        word-break: break-word;
    }
    
    .data-card-actions {
        margin-top: 15px;
        padding-top: 12px;
        border-top: 1px solid #f1f5f9;
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
    }
    
    .data-card-actions .btn {
        flex: 1;
        min-width: 100px;
        font-size: 14px;
        padding: 10px 12px;
    }
}

/* Status badges for mobile cards */
.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-pending {
    background: #fef5e7;
    color: #d69e2e;
}

.status-approved {
    background: #f0fff4;
    color: #38a169;
}

.status-rejected {
    background: #fed7d7;
    color: #e53e3e;
}

.status-paid {
    background: #ebf8ff;
    color: #3182ce;
}

/* Statistics grid mobile optimization */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .stat-card {
        padding: 15px 10px;
        text-align: center;
        border-radius: 8px;
        background: white;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
    
    .stat-value {
        font-size: 1.5rem;
        font-weight: bold;
        margin-bottom: 4px;
    }
    
    .stat-label {
        font-size: 0.8rem;
        color: #718096;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
}

/* Global stat value and label styles */
.stat-value {
    font-size: 2rem !important;
    font-weight: bold !important;
    margin-bottom: 8px !important;
    line-height: 1 !important;
}

.stat-label {
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

/* Desktop stat adjustments */
@media (min-width: 769px) {
    .stat-value {
        font-size: 2.5rem !important;
    }
    
    .stat-label {
        font-size: 1rem !important;
    }
}

/* Progress bars for mobile */
.progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin: 8px 0;
}

.progress-fill {
    height: 100%;
    background: #444445;
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Mobile-optimized filters */
@media (max-width: 768px) {
    .filters-container {
        background: white;
        padding: 15px;
        margin: 0 -15px 20px;
        border-bottom: 1px solid #e2e8f0;
        position: sticky;
        top: 0;
        z-index: 100;
    }
    
    .filters-row {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    .filter-group {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        align-items: center;
    }
    
    .filter-group select {
        flex: 1;
        min-width: 120px;
        padding: 10px;
        border-radius: 5px;
        border: 1px solid #e2e8f0;
        font-size: 14px;
    }
    
    .filter-actions {
        display: flex;
        gap: 8px;
        margin-top: 10px;
    }
    
    .filter-actions .btn {
        flex: 1;
        padding: 12px;
        font-size: 14px;
    }
}

/* Loading states for mobile data */
.mobile-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    color: #718096;
}

.mobile-loading i {
    margin-right: 10px;
    font-size: 1.2rem;
}

/* Empty states for mobile */
.mobile-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #718096;
}

.mobile-empty-state i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #cbd5e0;
}

.mobile-empty-state h3 {
    color: #4a5568;
    margin-bottom: 8px;
}

.mobile-empty-state p {
    color: #718096;
    font-size: 14px;
}

/* Pagination for mobile */
.mobile-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    gap: 10px;
}

.mobile-pagination .btn {
    padding: 10px 15px;
    font-size: 14px;
    min-width: 44px;
    height: 44px;
}

.mobile-pagination .page-info {
    font-size: 14px;
    color: #718096;
    margin: 0 10px;
}

.balance-display:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Success/Error Messages */
.success-message {
    background: #f0fff4;
    color: #38a169;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 4px solid #38a169;
    display: flex;
    align-items: center;
    gap: 10px;
}

.success-message::before {
    content: '✓';
    font-weight: bold;
    color: #38a169;
}

.error-message {
    background: #fed7d7;
    color: #c53030;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 4px solid #c53030;
    display: flex;
    align-items: center;
    gap: 10px;
}

.error-message::before {
    content: '⚠';
    font-weight: bold;
    color: #c53030;
}

.info-message {
    background: #e6fffa;
    color: #234e52;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 4px solid #319795;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-message::before {
    content: 'ℹ';
    font-weight: bold;
    color: #319795;
    border: 1px solid #9ae6b4;
    text-align: center;
}

.info-message {
    background: #ebf8ff;
    color: #444445;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 1px solid #90cdf4;
    text-align: center;
}

/* Notification Styles */
.notification-btn {
    position: relative;
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #4a5568;
}

.notification-btn:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
    transform: scale(1.05);
}

/* Animated Submit Button (reusable) */
.animated-submit {
    width: 270px;
    height: 48px;
    border: none;
    outline: none;
    background: #2f2f2f;
    color: #fff;
    font-size: 16px;
    border-radius: 24px;
    text-align: center;
    box-shadow: 0 6px 20px -5px rgba(0,0,0,0.4);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.animated-submit .btnText { margin: 0; }
.animated-submit .check-box {
    width: 48px;
    height: 48px;
    border-radius: 24px;
    box-shadow: 0 0 12px -2px rgba(0,0,0,0.5);
    position: absolute;
    top: 0;
    right: -24px;
    opacity: 0;
}
.animated-submit .check-box svg { width: 26px; margin: 11px; }
.animated-submit svg path {
    stroke-width: 3;
    stroke: #fff;
    stroke-dasharray: 34;
    stroke-dashoffset: 34;
    stroke-linecap: round;
    fill: transparent;
}
.animated-submit.active { background: #F8A55F; transition: 1s; }
.animated-submit.active .check-box { right: 0; opacity: 1; transition: 1s; }
.animated-submit.active .btnText { margin-right: 72px; transition: 1s; }
.animated-submit.active svg path { stroke-dashoffset: 0; transition: 1s; transition-delay: 1s; }

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #e53e3e;
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    line-height: 1.2;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Success Popup Animation */
@keyframes successPopupIn {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5) rotate(-45deg);
    }
    60% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.1) rotate(5deg);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
    }
}

@keyframes successPopupOut {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8) rotate(15deg);
    }
}

@keyframes checkMark {
    0% {
        stroke-dashoffset: 100;
    }
    100% {
        stroke-dashoffset: 0;
    }
}

.success-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(40, 167, 69, 0.4);
    text-align: center;
    z-index: 10000;
    min-width: 300px;
    animation: successPopupIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.success-popup.fade-out {
    animation: successPopupOut 0.3s ease-in forwards;
}

.success-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 9999;
    opacity: 0;
    animation: fadeIn 0.3s ease forwards;
}

.success-popup-overlay.fade-out {
    animation: fadeOut 0.3s ease forwards;
}

.success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.success-icon svg {
    width: 40px;
    height: 40px;
    stroke: white;
    stroke-width: 3;
    fill: none;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: checkMark 0.8s ease-in-out 0.3s forwards;
}

.success-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.success-message {
    font-size: 1rem;
    opacity: 0.9;
    line-height: 1.4;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* Modal Styles for Notifications */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
    position: relative;
    width: 90%;
    max-width: 600px;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #444445;
    background: linear-gradient(135deg, #444445 0%, #F8A55F 100%);
    color: white;
    border-radius: 15px 15px 0 0;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 25px;
}

.notification-item {
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.notification-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Button styles for small buttons in notifications */
.btn-sm {
    padding: 4px 8px;
    font-size: 0.8rem;
    border-radius: 5px;
}

/* Responsive design for notifications */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10px;
        max-height: 80vh;
    }
    
    .modal-header {
        padding: 15px 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .notification-item {
        padding: 12px !important;
        margin-bottom: 12px !important;
    }
    
    .notification-btn {
        width: 38px;
        height: 38px;
    }
}

/* Force uniform card sizes - Override rules */
.dashboard-grid .dashboard-card {
    height: 280px !important;
    min-height: 280px !important;
    max-height: 280px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    align-items: stretch !important;
}

.dashboard-grid .dashboard-card .card-icon {
    flex-shrink: 0 !important;
    margin-bottom: 15px !important;
}

.dashboard-grid .dashboard-card .card-title {
    flex-shrink: 0 !important;
    margin-bottom: 10px !important;
}

.dashboard-grid .dashboard-card .card-description {
    flex-grow: 1 !important;
    display: flex !important;
    align-items: center !important;
    text-align: center !important;
}

/* ==================================
   PINK THEME - For office.manager@lifelinelogistic.com
   ================================== */

/* Pink Theme Body Background */
body.pink-theme {
    background: linear-gradient(135deg, #FF69B4 0%, #FFB6C1 50%, #FFC0CB 100%) !important;
}

/* Pink Theme Login Card */
.pink-theme .login-card {
    border: 2px solid #FF69B4 !important;
    box-shadow: 0 20px 40px rgba(255, 105, 180, 0.2) !important;
}

/* Pink Theme Logo and Text */
.pink-theme .logo h1 {
    color: #D1477A !important;
    text-shadow: 2px 2px 4px rgba(255, 105, 180, 0.3) !important;
}

/* Pink Theme Form Inputs */
.pink-theme .form-group input:focus {
    border-color: #FF69B4 !important;
    box-shadow: 0 0 0 3px rgba(255, 105, 180, 0.2) !important;
}

/* Pink Theme Login Button */
.pink-theme .login-btn {
    background: linear-gradient(135deg, #FF69B4 0%, #FFB6C1 50%, #FFC0CB 100%) !important;
    box-shadow: 0 4px 15px rgba(255, 105, 180, 0.3) !important;
}

.pink-theme .login-btn:hover {
    box-shadow: 0 10px 25px rgba(255, 105, 180, 0.4) !important;
    transform: translateY(-3px) !important;
}

/* Pink Theme Dashboard Container */
.pink-theme .dashboard-container {
    background: #FFF0F5 !important;
}

/* Pink Theme Header */
.pink-theme .header {
    background: linear-gradient(135deg, #FF69B4 0%, #FFB6C1 100%) !important;
    box-shadow: 0 4px 15px rgba(255, 105, 180, 0.3) !important;
}

.pink-theme .header-title {
    color: white !important;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3) !important;
}

/* Pink Theme Profile Icon */
.pink-theme .profile-icon {
    background: linear-gradient(135deg, #FF1493 0%, #FF69B4 100%) !important;
    box-shadow: 0 4px 10px rgba(255, 20, 147, 0.3) !important;
}

.pink-theme .profile-icon:hover {
    transform: scale(1.15) !important;
    box-shadow: 0 6px 15px rgba(255, 20, 147, 0.4) !important;
}

/* Pink Theme User Info */
.pink-theme .user-info {
    color: white !important;
}

/* Pink Theme Dashboard Cards */
.pink-theme .dashboard-card {
    background: linear-gradient(135deg, #FFF0F5 0%, #FFE4E1 100%) !important;
    border: 2px solid #FFB6C1 !important;
    box-shadow: 0 8px 25px rgba(255, 182, 193, 0.3) !important;
}

.pink-theme .dashboard-card:hover {
    border-color: #FF69B4 !important;
    box-shadow: 0 12px 35px rgba(255, 105, 180, 0.4) !important;
    transform: translateY(-8px) scale(1.02) !important;
}

/* Pink Theme Card Icons */
.pink-theme .card-icon {
    background: linear-gradient(135deg, #FF69B4 0%, #FFB6C1 100%) !important;
    color: white !important;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3) !important;
    box-shadow: 0 4px 15px rgba(255, 105, 180, 0.3) !important;
    border-radius: 20px !important;
    padding: 15px !important;
    font-size: 2.5rem !important;
}

/* Pink Theme Card Titles */
.pink-theme .card-title {
    color: #D1477A !important;
    text-shadow: 1px 1px 2px rgba(255, 105, 180, 0.2) !important;
}

/* Pink Theme Card Descriptions */
.pink-theme .card-description {
    color: #8B4A6B !important;
}

/* Pink Theme Welcome Section */
.pink-theme .welcome-section h2 {
    color: #D1477A !important;
    text-shadow: 2px 2px 4px rgba(255, 105, 180, 0.3) !important;
}

.pink-theme .welcome-section p {
    color: #8B4A6B !important;
}

/* Pink Theme Role Indicator */
.pink-theme .role-indicator {
    background: linear-gradient(135deg, #FF69B4 0%, #FFB6C1 100%) !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(255, 105, 180, 0.3) !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3) !important;
}

/* Pink Theme Balance Display */
.pink-theme .balance-display {
    background: linear-gradient(135deg, #FF1493 0%, #FF69B4 100%) !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(255, 20, 147, 0.3) !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3) !important;
}

.pink-theme .balance-display:hover {
    box-shadow: 0 6px 18px rgba(255, 20, 147, 0.4) !important;
    transform: translateY(-2px) scale(1.05) !important;
}

/* Pink Theme Notification Button */
.pink-theme .notification-btn {
    background: #FFE4E1 !important;
    border-color: #FFB6C1 !important;
    color: #D1477A !important;
}

.pink-theme .notification-btn:hover {
    background: #FFB6C1 !important;
    border-color: #FF69B4 !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(255, 105, 180, 0.3) !important;
}

/* Pink Theme Modal Header */
.pink-theme .modal-header {
    background: linear-gradient(135deg, #FF69B4 0%, #FFB6C1 100%) !important;
}

/* Pink Theme Special Animations */
@keyframes pinkGlow {
    0% {
        box-shadow: 0 0 20px rgba(255, 105, 180, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(255, 105, 180, 0.6);
    }
    100% {
        box-shadow: 0 0 20px rgba(255, 105, 180, 0.3);
    }
}

.pink-theme .dashboard-card {
    animation: pinkGlow 3s ease-in-out infinite !important;
}

/* Pink Theme Connection Status */
.pink-theme .connection-status {
    background: #FFE4E1 !important;
    color: #D1477A !important;
    border: 2px solid #FFB6C1 !important;
}
