/* Larko - Professional Greyish Dark Navy Theme */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Palette from provided swatch */
    --primary-blue: #383838;
    --primary-blue-dark: #383838;
    --primary-blue-light: #ACB7B2;
    --secondary-blue: #33635D;
    --accent-blue: #CEBFD4;
    
    /* Backgrounds */
    --bg-light: #383838;
    --bg-white: #ACB7B2;
    --bg-grey: #969292;
    --bg-dark-grey: #33635D; /* keep dark grey outlines */
    --panel-bg: #ACB7B2; /* lighter than background for containers */
    --card-bg: #CEBFD4; /* distinct card fill */
    
    /* Text Colors */
    --text-dark: #0f1414;
    --text-gray: #215360;
    --text-light-gray: #33635D;
    --text-white: #ffffff;
    
    /* Borders */
    --border-color: #202e31;
    --border-dark: #3a3a3a;
    
    /* Status Colors */
    --success: #3fbf8c;
    --error: #ff6b6b;
    --warning: #e0a100;
    
    /* Shadows */
    --shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.3), 0 1px 3px 0 rgba(0, 0, 0, 0.25);
    --shadow-md: 0 4px 8px 0 rgba(0, 0, 0, 0.35), 0 2px 6px 0 rgba(0, 0, 0, 0.28);
    --shadow-lg: 0 10px 20px 0 rgba(0, 0, 0, 0.4), 0 4px 8px 0 rgba(0, 0, 0, 0.32);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.45), 0 10px 10px -5px rgba(0, 0, 0, 0.35);
}

html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #383838;
    background-image: radial-gradient(circle at 20% 20%, rgba(255,255,255,0.03), transparent 25%), radial-gradient(circle at 80% 0%, rgba(255,255,255,0.04), transparent 30%), linear-gradient(135deg, #383838 0%, #215360 100%);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Ensure touch-friendly interactions on mobile */
* {
    -webkit-tap-highlight-color: transparent;
}

/* Theming: apply lighter panels over dark background */
.header,
.welcome-section,
.dashboard-section,
.auth-box,
.payment-box,
.upload-box,
.form-box,
.package-card,
.carousel-card,
.order-summary,
.upload-info,
.table-container .data-table,
.modal-content,
.modal-order-info,
.tab-content {
    background: var(--panel-bg) !important;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
}

/* Mobile-first: smaller padding on mobile */
@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
}

/* Header */
.header {
    background: var(--bg-white);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    margin-bottom: 30px;
    overflow: hidden;
}

.header-top {
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.header h1 {
    color: var(--primary-blue-dark);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin: 0;
}

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

/* Welcome Section */
.welcome-section {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.welcome-section h1 {
    color: var(--primary-blue-dark);
    font-size: 36px;
    margin-bottom: 15px;
    font-weight: 700;
    letter-spacing: -1px;
}

.welcome-section p {
    color: var(--text-gray);
    font-size: 18px;
    margin-bottom: 40px;
}

.button-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.info-link {
    margin-top: 20px;
}

/* Auth Box */
.auth-box {
    max-width: 450px;
    margin: 50px auto;
    background: var(--bg-white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.auth-box h2 {
    color: var(--primary-blue-dark);
    text-align: center;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.auth-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid var(--border-color);
}

.auth-footer p {
    margin-bottom: 10px;
    color: var(--text-gray);
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.2px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="file"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: var(--bg-white);
    color: var(--text-dark);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.15);
    background: var(--bg-white);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: var(--text-gray);
    font-size: 12px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--primary-blue);
    color: var(--text-white);
    touch-action: manipulation; /* Better touch response */
    min-height: 44px; /* Minimum touch target size */
    min-width: 44px;
    box-shadow: var(--shadow);
    letter-spacing: 0.3px;
}

.btn:hover {
    background: var(--primary-blue-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn:active {
    transform: translateY(0);
    box-shadow: var(--shadow);
}

.btn-primary {
    background: var(--primary-blue);
    color: var(--text-white);
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    background: var(--primary-blue-dark);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--secondary-blue);
    color: var(--text-white);
    box-shadow: var(--shadow);
}

.btn-secondary:hover {
    background: var(--primary-blue-dark);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
    box-shadow: none;
}

.btn-outline:hover {
    background: var(--primary-blue);
    color: var(--text-white);
    box-shadow: var(--shadow);
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-success {
    background: #33635D;
    color: #f5f5f5;
    border: 1px solid #215360;
}

.alert-error {
    background: #d6d2d2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

.alert-info {
    background: #dbeafe;
    color: #131314;
    border: 1px solid #d6e6ff;
}

/* Dashboard Sections */
.dashboard-section {
    background: var(--bg-white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    margin-bottom: 30px;
}

.dashboard-section h2 {
    color: var(--primary-blue-dark);
    margin-bottom: 25px;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0;
    background: var(--bg-grey);
    padding: 0 10px;
    border-top: 1px solid var(--border-color);
}

.tab {
    padding: 15px 25px;
    text-decoration: none;
    color: var(--text-gray);
    font-weight: 600;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
    position: relative;
    background: transparent;
}

.tab:hover {
    color: var(--primary-blue-dark);
    background: rgba(30, 58, 95, 0.05);
}

.tab.active {
    color: var(--primary-blue-dark);
    border-bottom-color: var(--primary-blue-dark);
    font-weight: 700;
    background: var(--bg-white);
}

.tab-content {
    background: var(--bg-white);
    padding: 30px;
    border-radius: 0 0 12px 12px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    border-top: none;
}

/* Packages Grid */
.packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.carousel-wrapper {
    overflow: visible;
    margin: 0;
    padding: 0;
}

.package-carousel {
    display: grid;
    grid-template-columns: repeat(3, minmax(240px, 1fr));
    gap: 14px;
    padding: 5px 0 10px 0;
}

.carousel-card {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow);
    width: 100%;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.carousel-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.carousel-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-blue);
}

.carousel-card:hover::before {
    opacity: 1;
}

.carousel-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
    text-align: center;
}

.carousel-title {
    font-weight: 700;
    color: var(--primary-blue-dark);
    font-size: 18px;
    margin-bottom: 8px;
}

.carousel-subtitle {
    color: var(--text-dark);
    font-size: 15px;
    text-align: center;
    font-weight: 600;
    margin-bottom: 5px;
}

.carousel-price {
    font-weight: 700;
    color: var(--primary-blue-dark);
    font-size: 20px;
    margin-top: 10px;
}

.carousel-badge {
    display: inline-block;
    background: var(--secondary-blue);
    color: #ffffff;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    margin-top: 4px;
    width: fit-content;
    box-shadow: 0 2px 4px rgba(51, 99, 93, 0.3);
}

/* Tablet/mobile adjustments */
@media (max-width: 768px) {
    .package-carousel {
        grid-template-columns: repeat(2, minmax(200px, 1fr));
        gap: 12px;
    }
    
    .carousel-card {
        padding: 12px;
    }
    
    .carousel-meta {
        gap: 4px;
    }
    
    .carousel-title {
        font-size: 16px;
        margin-bottom: 4px;
    }
    
    .carousel-subtitle {
        font-size: 13px;
        margin-bottom: 3px;
    }
    
    .carousel-price {
        font-size: 18px;
        margin-top: 6px;
    }
    
    .carousel-badge {
        padding: 3px 8px;
        font-size: 10px;
        margin-top: 2px;
        position: static !important;
        top: auto !important;
        right: auto !important;
        order: 10;
        margin-top: 8px;
        align-self: center;
    }
    
    .carousel-card .btn {
        padding: 8px 12px;
        font-size: 13px;
        margin-top: 8px;
    }
    
    /* Override inline styles for tablet */
    .carousel-size {
        font-size: 12px !important;
        margin: 6px 0 !important;
    }
    
    .carousel-price {
        font-size: 20px !important;
        margin-top: 10px !important;
    }
    
    .carousel-button-container {
        margin-top: 10px !important;
        padding-top: 10px !important;
        order: 5;
    }
}

@media (max-width: 480px) {
    .package-carousel {
        grid-template-columns: repeat(2, minmax(140px, 1fr));
        gap: 10px;
    }
    
    .carousel-card {
        padding: 10px;
        border-radius: 12px;
    }
    
    .carousel-meta {
        gap: 3px;
    }
    
    .carousel-title {
        font-size: 14px;
        margin-bottom: 3px;
    }
    
    .carousel-subtitle {
        font-size: 12px;
        margin-bottom: 2px;
    }
    
    .carousel-price {
        font-size: 16px;
        margin-top: 4px;
    }
    
    .carousel-badge {
        padding: 2px 6px;
        font-size: 9px;
        margin-top: 1px;
        position: static !important;
        top: auto !important;
        right: auto !important;
        order: 10;
        margin-top: 6px;
        align-self: center;
    }
    
    .carousel-card .btn {
        padding: 6px 10px;
        font-size: 12px;
        margin-top: 6px;
        min-height: 36px;
    }
    
    .carousel-card::before {
        height: 2px;
    }
    
    /* Override inline styles for mobile */
    .carousel-size {
        font-size: 11px !important;
        margin: 4px 0 !important;
    }
    
    .carousel-price {
        font-size: 18px !important;
        margin-top: 6px !important;
    }
    
    .carousel-button-container {
        margin-top: 8px !important;
        padding-top: 8px !important;
        order: 5;
    }
}

.package-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 25px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.package-card:hover {
    border-color: var(--primary-blue);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: var(--primary-blue-dark);
}

.package-card h3 {
    color: var(--primary-blue-dark);
    font-size: 22px;
    margin-bottom: 10px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.package-description {
    color: var(--text-light-gray);
    margin-bottom: 15px;
    font-size: 14px;
    line-height: 1.6;
}

.package-details {
    margin-bottom: 20px;
}

.package-details p {
    margin-bottom: 8px;
    color: var(--text-dark);
    font-size: 14px;
}

.package-price {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-blue-dark);
    margin-top: 10px;
}

/* Tables */
.table-container {
    overflow-x: auto;
    margin-top: 20px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-white);
    box-shadow: var(--shadow);
}

.data-table thead {
    background: var(--primary-blue-dark);
    color: var(--text-white);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.data-table th {
    padding: 15px;
    text-align: left;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    font-size: 12px;
    position: relative;
}

.filterable-header {
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease;
}

.filterable-header:hover {
    background: rgba(30, 58, 95, 0.05);
}

.filter-indicator {
    margin-left: 8px;
    font-size: 14px;
    opacity: 0.7;
}

.status-filter-btn {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    background: white;
    color: var(--text-primary);
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.status-filter-btn:hover {
    background: rgba(30, 58, 95, 0.05);
    border-color: var(--primary-color);
}

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

.data-table td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
    color: var(--text-dark);
    word-break: break-word;
}

.data-table tbody tr {
    transition: background 0.2s ease;
}

.data-table tbody tr:hover {
    background: var(--bg-grey);
}

.data-table .no-data {
    text-align: center;
    color: var(--text-gray);
    padding: 40px;
}

.order-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 160px;
}

.order-actions .btn-sm {
    white-space: nowrap;
    min-width: 44px;
    text-align: center;
    font-size: 12px;
    padding: 8px 10px;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-delete {
    background: #ef4444 !important;
    color: white !important;
    border: none !important;
}

.btn-delete:hover {
    background: #dc2626 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 18px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
}

.status-completed {
    background: #33635D;
    color: #ffffff;
    box-shadow: 0 1px 3px rgba(5, 150, 105, 0.2);
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
    box-shadow: 0 1px 3px rgba(217, 119, 6, 0.2);
}

.status-failed {
    background: #fee2e2;
    color: #991b1b;
    box-shadow: 0 1px 3px rgba(220, 38, 38, 0.2);
}

.status-active {
    background: #33635D;
    color: #ffffff;
    box-shadow: 0 1px 3px rgba(5, 150, 105, 0.2);
}

.status-inactive {
    background: #e5e7eb;
    color: #4b5563;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Payment Box */
.payment-box {
    max-width: 600px;
    margin: 30px auto;
    background: var(--bg-white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.order-summary {
    background: var(--bg-grey);
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.order-summary h3 {
    color: var(--primary-blue);
    margin-bottom: 20px;
    font-size: 20px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-item.total {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-blue);
    margin-top: 10px;
    padding-top: 20px;
    border-top: 2px solid var(--primary-blue);
}

.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.payment-method {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 44px; /* Touch-friendly */
    background: var(--bg-white);
    box-shadow: var(--shadow);
}

.payment-method:hover {
    border-color: var(--primary-blue);
    background: var(--bg-grey);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.payment-method input[type="radio"] {
    margin-right: 10px;
    min-width: 20px;
    min-height: 20px;
}

.payment-footer {
    text-align: center;
    margin-top: 25px;
}

/* Upload Box */
.upload-box {
    max-width: 900px;
    margin: 30px auto;
    background: var(--bg-white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.upload-info {
    background: var(--bg-grey);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.upload-info h3 {
    color: var(--primary-blue-dark);
    margin-bottom: 10px;
    font-weight: 700;
}

.upload-info p {
    color: var(--text-dark);
    margin-bottom: 5px;
}

.upload-form {
    margin-bottom: 30px;
}

.uploaded-files {
    margin-top: 30px;
}

.uploaded-files h3 {
    color: var(--primary-blue);
    margin-bottom: 20px;
}

.upload-note {
    color: var(--text-gray);
    font-style: italic;
    margin-bottom: 15px;
    padding: 10px;
    background: var(--bg-light);
    border-radius: 6px;
    border-left: 3px solid var(--primary-blue);
}

.files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
}

.file-item {
    text-align: center;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-light);
}

.file-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 10px;
}

.file-item p {
    font-size: 12px;
    color: var(--text-dark);
    margin-bottom: 5px;
    word-break: break-all;
}

.file-item small {
    color: var(--text-gray);
    font-size: 11px;
}

.upload-footer {
    margin-top: 30px;
    text-align: center;
}

/* Form Box */
.form-box {
    max-width: 600px;
    margin: 30px auto;
    background: var(--bg-white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.form-box h2,
.form-box h3 {
    color: var(--primary-blue-dark);
    margin-bottom: 25px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.action-bar {
    margin-bottom: 25px;
}

/* Links */
.link {
    color: var(--primary-blue);
    text-decoration: none;
    transition: color 0.3s ease;
    min-height: 44px; /* Touch-friendly */
    display: inline-flex;
    align-items: center;
}

.link:hover {
    color: var(--primary-blue-dark);
    text-decoration: underline;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: var(--bg-white);
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 900px;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

.modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-blue-dark) 0%, var(--primary-blue) 100%);
    color: var(--text-white);
    border-radius: 12px 12px 0 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.modal-header h2 {
    margin: 0;
    color: var(--text-white);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.modal-close {
    color: var(--text-white);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: all 0.3s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    background: var(--bg-grey);
    border-radius: 0 0 12px 12px;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.05);
}

.modal-loading {
    text-align: center;
    padding: 40px;
    color: var(--text-gray);
}

.modal-order-info {
    background: var(--bg-grey);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.order-info-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 15px;
}

.order-info-row:last-child {
    margin-bottom: 0;
}

.order-info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.order-info-item label {
    font-size: 13px;
    color: var(--text-gray);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.order-info-item span {
    font-size: 16px;
    color: var(--text-dark);
}

.order-info-item strong {
    color: var(--primary-blue-dark);
    font-weight: 700;
}

.modal-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.modal-image-card {
    background: var(--bg-white);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.modal-image-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
    border-color: var(--border-dark);
}

.modal-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 75%; /* 4:3 aspect ratio */
    overflow: hidden;
    background: #f0f0f0;
}

.modal-image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-image-card:hover .modal-image-overlay {
    opacity: 1;
}

.modal-image-info {
    padding: 12px;
}

.modal-image-name {
    font-size: 13px;
    color: var(--text-dark);
    margin: 0 0 5px 0;
    word-break: break-all;
    font-weight: 500;
}

.modal-image-info small {
    font-size: 11px;
    color: var(--text-gray);
}

.modal-empty {
    text-align: center;
    padding: 40px;
    color: var(--text-gray);
}

/* Responsive */
/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header-top {
        flex-direction: column;
        gap: 15px;
        text-align: center;
        padding: 15px 20px;
    }
    
    .header h1 {
        font-size: 20px;
    }
    
    .tabs {
        flex-wrap: wrap;
        gap: 0;
        padding: 0 5px;
    }
    
    .tab {
        padding: 10px 12px;
        font-size: 13px;
        flex: 1;
        min-width: 80px;
        text-align: center;
        line-height: 1.2;
    }
    
    .packages-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .package-card {
        padding: 20px;
    }
    
    .auth-box,
    .payment-box,
    .upload-box,
    .form-box {
        padding: 25px 20px;
        margin: 20px auto;
    }
    
    .welcome-section {
        padding: 40px 20px;
    }
    
    .welcome-section h1 {
        font-size: 28px;
    }
    
    .welcome-section p {
        font-size: 16px;
    }
    
    .button-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .button-group .btn {
        width: 100%;
    }
    
        /* Table Responsive */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        position: relative;
        margin: 0;
        padding: 0;
    }
    
    .data-table {
        font-size: 12px;
        width: 100%;
        min-width: 0;
        table-layout: fixed;
    }
    
    .data-table th,
    .data-table td {
        padding: 6px 6px;
        font-size: 12px;
        word-break: break-word;
        white-space: normal;
    }
    
    /* Make first column sticky on mobile for better UX */
    .data-table thead th:first-child,
    .data-table tbody td:first-child {
        position: sticky;
        left: 0;
        background: var(--primary-blue);
        color: white;
        z-index: 10;
        min-width: 80px;
    }
    
    .data-table tbody td:first-child {
        background: var(--bg-white);
        color: var(--text-dark);
        border-right: 1px solid var(--border-color);
    }
    
    .data-table tbody tr:hover td:first-child {
        background: var(--bg-light);
    }
    
    /* Hide less important columns on very small screens */
    @media (max-width: 480px) {
        .data-table th:nth-child(6),
        .data-table td:nth-child(6) {
            display: none; /* Hide Date column on very small screens */
        }
    }
    
    /* Order Actions on Mobile */
    .order-actions {
        flex-direction: row;
        gap: 4px;
        justify-content: center;
    }
    
    .order-actions .btn-sm {
        min-width: 32px;
        min-height: 32px;
        padding: 4px 8px;
        font-size: 14px;
    }
    
    /* Modal Mobile */
    .modal-content {
        width: 95%;
        margin: 5% auto;
        max-height: 90vh;
        border-radius: 8px;
    }
    
    .modal-header {
        padding: 15px 20px;
    }
    
    .modal-header h2 {
        font-size: 18px;
    }
    
    .modal-close {
        font-size: 24px;
    }
    
    .modal-body {
        padding: 20px 15px;
        max-height: calc(90vh - 140px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .modal-footer {
        flex-direction: column;
        padding: 15px 20px;
    }
    
    .modal-footer button {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .modal-footer button:last-child {
        margin-bottom: 0;
    }
    
    .modal-images-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 12px;
    }
    
    .order-info-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    /* Form Elements */
    .form-group input,
    .form-group textarea,
    .form-group select {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Package Cards */
    .package-price {
        font-size: 24px;
    }
    
    /* Upload Section */
    .upload-info {
        padding: 15px;
    }
    
    .files-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 15px;
    }
    
    /* Payment Box */
    .order-summary {
        padding: 20px;
    }
    
    .summary-item {
        font-size: 14px;
    }
    
    .summary-item.total {
        font-size: 16px;
    }
}

/* Extra Small Devices */
@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .header-top {
        padding: 12px 15px;
    }
    
    .header h1 {
        font-size: 18px;
    }
    
    .tabs {
        padding: 0;
    }
    
    .tab {
        padding: 10px 12px;
        font-size: 12px;
    }
    
    .dashboard-section {
        padding: 20px 15px;
    }
    
    .dashboard-section h2 {
        font-size: 20px;
    }
    
    .auth-box,
    .payment-box,
    .upload-box,
    .form-box {
        padding: 20px 15px;
    }
    
    .welcome-section {
        padding: 30px 15px;
    }
    
    .welcome-section h1 {
        font-size: 24px;
    }
    
    .data-table {
        font-size: 11px;
        width: 100%;
        min-width: 0;
        table-layout: fixed;
    }
    
    .data-table th,
    .data-table td {
        padding: 6px 5px;
        white-space: normal;
        word-break: break-word;
    }
    
    /* Hide Date column on very small screens to save space */
    .data-table th:nth-child(6),
    .data-table td:nth-child(6) {
        display: none;
    }
    
    .modal-content {
        width: 98%;
        margin: 1% auto;
        max-height: 98vh;
        border-radius: 8px;
    }
    
    .modal-header {
        padding: 12px 15px;
    }
    
    .modal-header h2 {
        font-size: 16px;
    }
    
    .modal-close {
        font-size: 22px;
        min-width: 32px;
        min-height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .modal-body {
        padding: 15px 10px;
        max-height: calc(98vh - 120px);
    }
    
    .modal-footer {
        padding: 12px 15px;
    }
    
    .modal-images-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 10px;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 14px;
        min-height: 44px;
    }
    
    .btn-sm {
        padding: 6px 10px;
        font-size: 12px;
        min-width: 36px;
        min-height: 36px;
    }
    
    .order-actions {
        gap: 6px;
    }
    
    .order-actions .btn-sm {
        min-width: 36px;
        min-height: 36px;
        padding: 6px;
    }
    
    .package-card {
        padding: 15px;
    }
    
    .package-price {
        font-size: 22px;
    }
    
    /* Form improvements */
    .form-group label {
        font-size: 14px;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 14px 12px;
    }
    
    /* Better spacing for mobile */
    .summary-item {
        padding: 10px 0;
        font-size: 14px;
    }
    
    /* Filter row mobile styles */
    #clientNameFilterRow td {
        padding: 8px 5px !important;
    }
    
    #clientNameFilterRow div {
        flex-direction: column;
        gap: 8px;
    }
    
    #clientNameFilterRow input {
        width: 100%;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    #clientNameFilterRow button {
        width: 100%;
    }
    
    #statusFilterRow button {
        width: 100%;
        margin: 0;
    }
    
    #statusFilterRow div {
        flex-direction: column;
        gap: 8px;
    }
    
    .status-filter-btn {
        width: 100%;
        padding: 10px;
    }
    
    .filter-indicator {
        font-size: 12px;
    }
    
    .summary-item.total {
        font-size: 18px;
        padding: 15px 0;
    }
}

/* Landscape Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .modal-content {
        max-height: 95vh;
    }
    
    .modal-body {
        max-height: calc(95vh - 140px);
    }
}

