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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    color: #1e293b;
}

/* Login Page Styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    padding: 48px;
    max-width: 480px;
    width: 100%;
}

.logo-section {
    text-align: center;
    margin-bottom: 40px;
}

.logo-section h1 {
    font-size: 32px;
    font-weight: 700;
    color: #1e3a8a;
    margin-bottom: 8px;
}

.logo-section p {
    color: #64748b;
    font-size: 16px;
}

.tab-container {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
    border-bottom: 2px solid #e2e8f0;
}

.tab-btn {
    flex: 1;
    padding: 12px 24px;
    background: none;
    border: none;
    font-size: 16px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: color 0.3s, border-color 0.3s;
}

.tab-btn.active {
    color: #1e3a8a;
    border-bottom-color: #3b82f6;
}

.tab-btn:hover {
    color: #1e3a8a;
}

/* Form Styles */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 500;
    font-size: 14px;
    color: #334155;
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.3s, box-shadow 0.3s;
}

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

.form-group input:disabled,
.form-group textarea:disabled {
    background: #f1f5f9;
    color: #64748b;
    cursor: not-allowed;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Button Styles */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s, box-shadow 0.3s;
    font-family: inherit;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
    box-shadow: 0 6px 16px rgba(30, 58, 138, 0.4);
}

.btn-secondary {
    background: #e2e8f0;
    color: #1e3a8a;
}

.btn-secondary:hover {
    background: #cbd5e1;
}

.btn-outline {
    background: white;
    color: #1e3a8a;
    border: 2px solid #1e3a8a;
}

.btn-outline:hover {
    background: #f1f5f9;
}

.btn-logout {
    background: #dc2626;
    color: white;
}

.btn-logout:hover {
    background: #b91c1c;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

/* Navbar */
.navbar {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: white;
    padding: 16px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-container h2 {
    font-size: 24px;
    font-weight: 700;
}

.nav-container div {
    display: flex;
    gap: 12px;
}

/* Portal Container */
.portal-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 24px;
}

.portal-header {
    text-align: center;
    margin-bottom: 48px;
}

.portal-header h1 {
    font-size: 40px;
    font-weight: 700;
    color: #1e3a8a;
    margin-bottom: 12px;
}

.portal-header p {
    font-size: 18px;
    color: #64748b;
}

/* Profile Section */
.profile-section,
.action-section,
.orders-section,
.order-form-section,
.admin-section {
    background: white;
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

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

.section-header h2 {
    font-size: 24px;
    font-weight: 600;
    color: #1e3a8a;
}

#editActions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

/* Action Card */
.action-card {
    text-align: center;
    padding: 32px;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-radius: 12px;
}

.action-card h3 {
    font-size: 24px;
    color: #1e3a8a;
    margin-bottom: 12px;
}

.action-card p {
    color: #475569;
    margin-bottom: 24px;
}

/* Orders Grid */
.orders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.order-card {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.order-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

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

.order-header h4 {
    font-size: 16px;
    color: #1e3a8a;
    font-weight: 600;
}

.order-card p {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 8px;
}

/* Status Badge */
.status-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

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

.status-processing {
    background: #dbeafe;
    color: #1e40af;
}

.status-completed {
    background: #d1fae5;
    color: #065f46;
}

.role-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    background: #e0e7ff;
    color: #3730a3;
    text-transform: capitalize;
}

/* Pricing Display */
.pricing-display {
    margin: 32px 0;
}

.pricing-card {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-radius: 12px;
    padding: 24px;
}

.pricing-card h3 {
    font-size: 20px;
    color: #1e3a8a;
    margin-bottom: 16px;
}

.pricing-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pricing-row {
    display: flex;
    justify-content: space-between;
    font-size: 15px;
}

.pricing-row.total {
    border-top: 2px solid #93c5fd;
    padding-top: 12px;
    margin-top: 8px;
    font-size: 18px;
    font-weight: 700;
    color: #1e3a8a;
}

/* Analytics Grid */
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.analytics-card {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: white;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
}

.analytics-card h3 {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 12px;
    opacity: 0.9;
}

.analytics-number {
    font-size: 32px;
    font-weight: 700;
}

/* Admin Tabs */
.admin-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    border-bottom: 2px solid #e2e8f0;
}

.admin-tab {
    padding: 12px 24px;
    background: none;
    border: none;
    font-size: 16px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: color 0.3s, border-color 0.3s;
}

.admin-tab.active {
    color: #1e3a8a;
    border-bottom-color: #3b82f6;
}

/* Table */
.table-container {
    overflow-x: auto;
}

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

.data-table thead {
    background: #f1f5f9;
}

.data-table th,
.data-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.data-table th {
    font-weight: 600;
    color: #1e3a8a;
    font-size: 14px;
    text-transform: uppercase;
}

.data-table td {
    font-size: 14px;
    color: #475569;
}

.data-table tr:hover {
    background: #f8fafc;
}

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

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 32px;
    border-radius: 16px;
    max-width: 600px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-close {
    color: #94a3b8;
    float: right;
    font-size: 32px;
    font-weight: 700;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: #64748b;
}

.modal-content h2 {
    color: #1e3a8a;
    margin-bottom: 24px;
}

#orderDetails {
    margin: 24px 0;
}

#orderDetails p {
    margin-bottom: 12px;
    font-size: 15px;
    color: #475569;
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.modal-actions select {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
}

/* Utility Classes */
.error-message {
    color: #dc2626;
    font-size: 14px;
    margin-top: 8px;
    display: none;
}

.error-message:not(:empty) {
    display: block;
}

.no-data {
    text-align: center;
    color: #94a3b8;
    padding: 48px 24px;
    font-size: 16px;
}

.filter-group select {
    padding: 8px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-card {
        padding: 32px 24px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .portal-header h1 {
        font-size: 32px;
    }

    .analytics-grid {
        grid-template-columns: 1fr;
    }

    .nav-container div {
        flex-direction: column;
        gap: 8px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    #editActions {
        flex-direction: column;
    }

    .modal-actions {
        flex-direction: column;
    }
}
