/* =============================================
   SILENT DISCO HEADSETS - CUSTOMER PORTAL STYLES
   ============================================= */

/* ==================== */
/* PORTAL LAYOUT */
/* ==================== */

.portal-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.portal-header {
    background: var(--white);
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}

.portal-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.portal-logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--purple-dark);
}

.portal-logo img {
    height: 40px;
    width: auto;
}

.portal-nav {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.portal-nav a {
    color: var(--gray-dark);
    font-weight: 500;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: all var(--transition-fast);
}

.portal-nav a:hover,
.portal-nav a.active {
    color: var(--purple-dark);
    border-bottom-color: var(--purple-dark);
}

/* Mobile Nav Toggle */
.portal-mobile-toggle {
    display: none;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--gray-dark);
}

.portal-mobile-toggle svg {
    display: block;
}

/* Mobile Nav Dropdown */
.portal-nav-mobile {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: var(--shadow-lg);
    padding: var(--spacing-sm) 0;
    z-index: 99;
}

.portal-nav-mobile.show {
    display: block;
}

.portal-nav-mobile a {
    display: block;
    padding: 0.75rem var(--spacing-md);
    color: var(--gray-dark);
    font-weight: 500;
    border-left: 3px solid transparent;
}

.portal-nav-mobile a:hover,
.portal-nav-mobile a.active {
    color: var(--purple-dark);
    background: rgba(94, 23, 235, 0.05);
    border-left-color: var(--purple-dark);
}

.portal-nav-mobile .nav-badge-inline {
    margin-left: 0.5rem;
}

.portal-user-menu {
    position: relative;
}

.portal-user-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--gray-light);
    border-radius: var(--border-radius);
    font-weight: 500;
    cursor: pointer;
}

.portal-user-btn:hover {
    background: #e5e5e7;
}

.portal-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-fast);
}

.portal-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.portal-dropdown a,
.portal-dropdown button {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    text-align: left;
    color: var(--gray-dark);
    font-size: 0.9375rem;
}

.portal-dropdown a:hover,
.portal-dropdown button:hover {
    background: var(--gray-light);
    color: var(--purple-dark);
}

.portal-dropdown hr {
    border: none;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    margin: 0.5rem 0;
}

.portal-main {
    flex: 1;
    padding: var(--spacing-lg) 0;
    background: var(--gray-light);
}

.portal-footer {
    background: var(--white);
    padding: var(--spacing-sm) 0;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    text-align: center;
    color: var(--gray-medium);
    font-size: 0.875rem;
}

/* ==================== */
/* AUTH PAGES (Login/Register) */
/* ==================== */

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-purple);
    padding: var(--spacing-md);
}

.auth-card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 440px;
    padding: var(--spacing-lg);
}

.auth-logo {
    text-align: center;
    margin-bottom: var(--spacing-md);
}

.auth-logo img {
    height: 50px;
    margin: 0 auto;
}

.auth-logo h1 {
    font-size: 1.5rem;
    color: var(--purple-dark);
    margin-top: var(--spacing-sm);
}

.auth-title {
    text-align: center;
    margin-bottom: var(--spacing-md);
}

.auth-title h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.auth-title p {
    color: var(--gray-medium);
    margin-bottom: 0;
}

/* ==================== */
/* FORMS */
/* ==================== */

.form-group {
    margin-bottom: var(--spacing-sm);
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--gray-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e5e5e7;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--purple-dark);
}

.form-group input.error,
.form-group select.error,
.form-group textarea.error {
    border-color: #ef4444;
}

.form-error {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.form-hint {
    color: var(--gray-medium);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-sm);
}

.form-actions {
    margin-top: var(--spacing-md);
}

.form-actions .btn {
    width: 100%;
}

.form-footer {
    text-align: center;
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.form-footer a {
    color: var(--purple-dark);
    font-weight: 500;
}

.form-footer a:hover {
    text-decoration: underline;
}

/* ==================== */
/* DASHBOARD */
/* ==================== */

.dashboard-header {
    margin-bottom: var(--spacing-md);
}

.dashboard-header h1 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: 0.5rem;
}

.dashboard-header p {
    color: var(--gray-medium);
    margin-bottom: 0;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
}

.dashboard-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
    box-shadow: var(--shadow-sm);
}

.dashboard-card h3 {
    font-size: 1.125rem;
    margin-bottom: var(--spacing-sm);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dashboard-stat {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.dashboard-stat .number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--purple-dark);
    line-height: 1;
}

.dashboard-stat .label {
    color: var(--gray-medium);
}

/* ==================== */
/* ORDER TRACKER */
/* ==================== */

.order-tracker {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.tracker-stages {
    display: flex;
    justify-content: space-between;
    position: relative;
    padding: 0 1rem;
}

.tracker-stages::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 3rem;
    right: 3rem;
    height: 4px;
    background: #e5e5e7;
    z-index: 1;
}

.tracker-progress {
    position: absolute;
    top: 20px;
    left: 3rem;
    height: 4px;
    background: var(--gradient-purple);
    z-index: 2;
    transition: width var(--transition-smooth);
}

.tracker-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 3;
}

.stage-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #e5e5e7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--gray-medium);
    margin-bottom: 0.75rem;
    transition: all var(--transition-smooth);
}

.tracker-stage.completed .stage-icon,
.tracker-stage.active .stage-icon {
    background: var(--gradient-purple);
    color: var(--white);
}

.tracker-stage.delivered .stage-icon {
    background: #22c55e;
}

.stage-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-medium);
    text-align: center;
}

.tracker-stage.completed .stage-label,
.tracker-stage.active .stage-label {
    color: var(--gray-dark);
}

.stage-date {
    font-size: 0.75rem;
    color: var(--gray-medium);
    margin-top: 0.25rem;
}

.stage-subtitle {
    font-size: 0.6875rem;
    color: var(--gray-medium);
    margin-top: 0.125rem;
    font-weight: 400;
}

.stage-subtitle-link {
    font-size: 0.6875rem;
    color: var(--purple-dark);
    margin-top: 0.125rem;
    font-weight: 500;
    text-decoration: underline;
}

.stage-subtitle-link:hover {
    color: var(--purple-light);
}

.stage-subtitle-info {
    font-size: 0.625rem;
    color: var(--purple-dark);
    font-family: monospace;
    margin-top: 0.125rem;
    font-weight: 600;
    display: block;
}

.stage-subtitle-address {
    font-size: 0.625rem;
    color: var(--gray-medium);
    margin-top: 0.125rem;
    display: block;
    max-width: 100px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stage-action {
    background: rgba(94, 23, 235, 0.1);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    text-decoration: none;
}

.stage-action:hover {
    background: rgba(94, 23, 235, 0.2);
}

/* ==================== */
/* LOGO UPLOAD */
/* ==================== */

.logo-upload-area {
    border: 2px dashed var(--gray-medium);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    text-align: center;
    transition: all var(--transition-fast);
    cursor: pointer;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-upload-area:hover,
.logo-upload-area.drag-over {
    border-color: var(--purple-dark);
    background: rgba(94, 23, 235, 0.05);
}

.upload-placeholder {
    pointer-events: none;
}

.upload-placeholder a {
    pointer-events: auto;
}

.upload-preview {
    position: relative;
    display: inline-block;
}

.upload-preview img {
    max-width: 100%;
    max-height: 180px;
    border-radius: var(--border-radius);
}

.remove-preview {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background: var(--error);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.remove-preview:hover {
    background: #dc2626;
}

/* ==================== */
/* TOGGLE SWITCH */
/* ==================== */

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .3s;
    border-radius: 22px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--purple-dark);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(18px);
}

.logo-badge {
    display: inline-block;
    font-size: 0.625rem;
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    margin-left: 0.5rem;
    font-weight: 600;
    text-transform: uppercase;
}

.logo-badge.uploaded {
    background: rgba(34, 197, 94, 0.1);
    color: #15803d;
}

.logo-badge.pending {
    background: rgba(234, 179, 8, 0.1);
    color: #a16207;
}

/* ==================== */
/* ORDER CARDS */
/* ==================== */

.order-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.order-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition-fast);
}

.order-card:hover {
    box-shadow: var(--shadow-md);
}

.order-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--spacing-sm);
}

.order-number {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.125rem;
}

.order-status {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 100px;
    font-size: 0.8125rem;
    font-weight: 600;
}

.order-status.received {
    background: rgba(94, 23, 235, 0.1);
    color: var(--purple-dark);
}

.order-status.processing {
    background: rgba(251, 191, 36, 0.2);
    color: #b45309;
}

.order-status.shipped {
    background: rgba(59, 130, 246, 0.1);
    color: #1d4ed8;
}

.order-status.delivered {
    background: rgba(34, 197, 94, 0.1);
    color: #15803d;
}

.order-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: var(--spacing-sm);
    padding-top: var(--spacing-sm);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.order-detail {
    text-align: center;
}

.order-detail .label {
    display: block;
    font-size: 0.75rem;
    color: var(--gray-medium);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.order-detail .value {
    font-weight: 600;
    color: var(--gray-dark);
}

/* ==================== */
/* RESOURCES GRID */
/* ==================== */

.resources-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.resources-filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 500;
    background: var(--white);
    color: var(--gray-dark);
    border: 1px solid #e5e5e7;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--purple-dark);
    color: var(--white);
    border-color: var(--purple-dark);
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-md);
}

.resource-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-smooth);
}

.resource-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.resource-thumbnail {
    height: 160px;
    background: var(--gradient-purple);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
}

.resource-thumbnail svg {
    width: 48px;
    height: 48px;
}

.resource-content {
    padding: var(--spacing-sm);
}

.resource-category {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--purple-dark);
    margin-bottom: 0.5rem;
}

.resource-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.resource-description {
    font-size: 0.875rem;
    color: var(--gray-medium);
    margin-bottom: var(--spacing-sm);
    line-height: 1.5;
}

.resource-action {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--purple-dark);
    font-weight: 600;
    font-size: 0.875rem;
}

.resource-action:hover {
    text-decoration: underline;
}

/* ==================== */
/* UPSELLS SECTION */
/* ==================== */

.upsells-section {
    margin-top: var(--spacing-lg);
}

.upsells-section h2 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-md);
}

.upsells-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-md);
}

.upsell-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-smooth);
}

.upsell-card:hover {
    box-shadow: var(--shadow-purple);
    transform: translateY(-4px);
}

.upsell-image {
    height: 180px;
    background: var(--gray-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.upsell-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.upsell-content {
    padding: var(--spacing-sm);
}

.upsell-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.upsell-description {
    font-size: 0.875rem;
    color: var(--gray-medium);
    margin-bottom: var(--spacing-sm);
    line-height: 1.5;
}

.upsell-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--purple-dark);
    margin-bottom: var(--spacing-sm);
}

.upsell-card .btn {
    width: 100%;
}

/* ==================== */
/* ADMIN STYLES */
/* ==================== */

.admin-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 260px;
    background: var(--navy);
    padding: var(--spacing-md);
    overflow-y: auto;
}

.admin-sidebar .portal-logo {
    color: var(--white);
    margin-bottom: var(--spacing-lg);
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.admin-nav a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    transition: all var(--transition-fast);
}

.admin-nav a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.admin-nav a.active {
    background: var(--purple-dark);
    color: var(--white);
}

.admin-nav a svg {
    width: 20px;
    height: 20px;
}

.admin-main {
    margin-left: 260px;
    min-height: 100vh;
    background: var(--gray-light);
}

.admin-header {
    background: var(--white);
    padding: var(--spacing-sm) var(--spacing-md);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-content {
    padding: var(--spacing-md);
}

/* Admin Tables */
.admin-table {
    width: 100%;
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.admin-table th,
.admin-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.admin-table th {
    background: var(--gray-light);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-medium);
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-table tr:hover td {
    background: rgba(94, 23, 235, 0.02);
}

/* Admin Action Buttons */
.action-btns {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.action-btn.edit {
    background: rgba(59, 130, 246, 0.1);
    color: #1d4ed8;
}

.action-btn.edit:hover {
    background: #1d4ed8;
    color: var(--white);
}

.action-btn.delete {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.action-btn.delete:hover {
    background: #dc2626;
    color: var(--white);
}

.action-btn.approve {
    background: rgba(34, 197, 94, 0.1);
    color: #15803d;
}

.action-btn.approve:hover {
    background: #15803d;
    color: var(--white);
}

/* Admin Stats */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.admin-stat-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: var(--spacing-sm);
    box-shadow: var(--shadow-sm);
}

.admin-stat-card .label {
    font-size: 0.875rem;
    color: var(--gray-medium);
    margin-bottom: 0.25rem;
}

.admin-stat-card .value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--purple-dark);
}

/* ==================== */
/* MODAL */
/* ==================== */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    width: 90%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform var(--transition-fast);
}

.modal-overlay.show .modal {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) var(--spacing-md);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.modal-header h3 {
    margin-bottom: 0;
}

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.modal-close:hover {
    background: var(--gray-light);
}

.modal-body {
    padding: var(--spacing-md);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

/* ==================== */
/* TOAST NOTIFICATIONS */
/* ==================== */

.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    background: var(--navy);
    color: var(--white);
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    transform: translateY(100px);
    opacity: 0;
    transition: all var(--transition-smooth);
    z-index: 2000;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-success {
    background: #15803d;
}

.toast-error {
    background: #dc2626;
}

.toast-warning {
    background: #b45309;
}

/* ==================== */
/* LOADING OVERLAY */
/* ==================== */

#loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
}

#loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e5e5e7;
    border-top-color: var(--purple-dark);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==================== */
/* PENDING APPROVAL PAGE */
/* ==================== */

.pending-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-light);
    padding: var(--spacing-md);
}

.pending-card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    text-align: center;
    max-width: 480px;
}

.pending-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--spacing-md);
    background: rgba(251, 191, 36, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pending-icon svg {
    width: 40px;
    height: 40px;
    color: #b45309;
}

.pending-card h1 {
    font-size: 1.75rem;
    margin-bottom: var(--spacing-sm);
}

.pending-card p {
    color: var(--gray-medium);
    margin-bottom: var(--spacing-md);
}

/* ==================== */
/* EMPTY STATES */
/* ==================== */

.empty-state {
    text-align: center;
    padding: var(--spacing-xl) var(--spacing-md);
}

.empty-state svg {
    width: 80px;
    height: 80px;
    color: var(--gray-medium);
    margin-bottom: var(--spacing-md);
}

.empty-state h3 {
    margin-bottom: var(--spacing-sm);
}

.empty-state p {
    color: var(--gray-medium);
}

/* ==================== */
/* RESPONSIVE */
/* ==================== */

@media (max-width: 768px) {
    .portal-header .container {
        position: relative;
    }

    .portal-nav {
        display: none;
    }

    .portal-mobile-toggle {
        display: block;
        order: -1;
        margin-right: var(--spacing-sm);
    }

    .portal-logo span {
        display: none;
    }

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

    .tracker-stages {
        flex-direction: column;
        gap: var(--spacing-sm);
        padding: 0;
    }

    .tracker-stages::before,
    .tracker-progress {
        display: none;
    }

    .tracker-stage {
        flex-direction: row;
        gap: var(--spacing-sm);
    }

    .stage-label {
        text-align: left;
    }

    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform var(--transition-smooth);
        z-index: 1000;
    }

    .admin-sidebar.show {
        transform: translateX(0);
    }

    .admin-main {
        margin-left: 0;
    }

    .admin-table {
        display: block;
        overflow-x: auto;
    }

    .order-card-header {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* ==================== */
/* FILE INPUT */
/* ==================== */

.file-input-wrapper {
    position: relative;
}

.file-input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-input-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 2rem;
    border: 2px dashed #e5e5e7;
    border-radius: var(--border-radius);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.file-input-label:hover {
    border-color: var(--purple-dark);
    background: rgba(94, 23, 235, 0.02);
}

.file-input-label svg {
    width: 24px;
    height: 24px;
    color: var(--gray-medium);
}

.file-preview {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--gray-light);
    border-radius: var(--border-radius);
    margin-top: 0.5rem;
}

.file-preview .file-name {
    flex: 1;
    font-size: 0.875rem;
}

.file-preview .remove-file {
    color: #dc2626;
    cursor: pointer;
}

/* ==================== */
/* BADGES */
/* ==================== */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-pending {
    background: rgba(251, 191, 36, 0.2);
    color: #b45309;
}

.badge-approved {
    background: rgba(34, 197, 94, 0.1);
    color: #15803d;
}

.badge-admin {
    background: rgba(94, 23, 235, 0.1);
    color: var(--purple-dark);
}

/* ==================== */
/* COMING SOON STYLES */
/* ==================== */

.coming-soon-card {
    position: relative;
    opacity: 0.75;
    background: linear-gradient(135deg, rgba(94, 23, 235, 0.03) 0%, rgba(255, 255, 255, 1) 100%);
    border: 1px dashed rgba(94, 23, 235, 0.3);
}

.coming-soon-badge {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    background: linear-gradient(135deg, var(--purple-dark) 0%, var(--purple-light) 100%);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.coming-soon-nav {
    opacity: 0.5;
    cursor: default !important;
    position: relative;
}

.coming-soon-nav:hover {
    background: transparent !important;
    opacity: 0.5;
}

.nav-badge {
    font-size: 0.625rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.125rem 0.5rem;
    border-radius: 10px;
    margin-left: auto;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-badge-inline {
    font-size: 0.625rem;
    background: rgba(94, 23, 235, 0.15);
    color: var(--purple-dark);
    padding: 0.125rem 0.5rem;
    border-radius: 10px;
    margin-left: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* ==================== */
/* SEO BATTLE DASHBOARD */
/* ==================== */

.seo-score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    margin: 0 auto;
    position: relative;
}

.seo-score-circle svg {
    position: absolute;
    top: 0;
    left: 0;
    transform: rotate(-90deg);
}

.seo-score-circle .score-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--purple-dark);
    line-height: 1;
    position: relative;
    z-index: 1;
}

.seo-score-circle .score-label {
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gray-medium);
    position: relative;
    z-index: 1;
}

.seo-progress-bar {
    background: #e5e5e7;
    border-radius: 100px;
    height: 24px;
    overflow: hidden;
    position: relative;
}

.seo-progress-fill {
    height: 100%;
    border-radius: 100px;
    background: linear-gradient(90deg, var(--purple-dark), var(--purple-light));
    transition: width 0.6s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 8px;
    min-width: 40px;
}

.seo-progress-fill span {
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--white);
}

.seo-progress-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    color: var(--gray-medium);
}

.seo-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
}

.seo-vitals-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-top: 1rem;
}

.seo-vital-item {
    background: var(--gray-light);
    border-radius: var(--border-radius);
    padding: 0.75rem;
    text-align: center;
}

.seo-vital-item .vital-label {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-medium);
    margin-bottom: 0.25rem;
}

.seo-vital-item .vital-value {
    font-size: 1.125rem;
    font-weight: 700;
}

.seo-vital-item .vital-value.good { color: #15803d; }
.seo-vital-item .vital-value.needs-improvement { color: #b45309; }
.seo-vital-item .vital-value.poor { color: #dc2626; }

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

.seo-checklist li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 0.875rem;
}

.seo-checklist li:last-child {
    border-bottom: none;
}

.seo-check {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.seo-check.done {
    background: rgba(34, 197, 94, 0.15);
    color: #15803d;
}

.seo-check.pending {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.seo-stat-editable {
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.seo-stat-editable:hover {
    box-shadow: 0 0 0 2px var(--purple-dark);
}

.seo-stat-editable:hover .value::after {
    content: ' (edit)';
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--purple-dark);
}

.seo-content-status {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
}

.seo-content-status.live { background: rgba(34, 197, 94, 0.1); color: #15803d; }
.seo-content-status.draft { background: rgba(251, 191, 36, 0.2); color: #b45309; }
.seo-content-status.planned { background: rgba(59, 130, 246, 0.1); color: #1d4ed8; }

.seo-refresh-btn {
    padding: 0.375rem 0.75rem;
    border-radius: var(--border-radius);
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(94, 23, 235, 0.1);
    color: var(--purple-dark);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.seo-refresh-btn:hover {
    background: var(--purple-dark);
    color: var(--white);
}

.seo-refresh-btn.loading svg {
    animation: spin 0.8s linear infinite;
}

.dashboard-card .admin-table {
    box-shadow: none;
}

@media (max-width: 768px) {
    .seo-two-col {
        grid-template-columns: 1fr;
    }

    .seo-vitals-grid {
        grid-template-columns: 1fr;
    }
}

/* ==================== */
/* CUSTOMER DETAIL GRID */
/* ==================== */

.customer-detail-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.detail-section h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--purple-dark);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(94, 23, 235, 0.1);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-size: 0.875rem;
    color: var(--gray-medium);
    flex-shrink: 0;
    margin-right: 1rem;
}

.detail-value {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-dark);
    text-align: right;
    word-break: break-word;
}

/* ==================== */
/* ADMIN BUTTON */
/* ==================== */

.admin-btn {
    display: inline-flex !important;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--purple-dark) 0%, #7c3aed 100%);
    color: var(--white) !important;
    padding: 0.5rem 1rem;
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.875rem;
    border: none;
    transition: all var(--transition-fast);
    box-shadow: 0 2px 8px rgba(94, 23, 235, 0.3);
}

.admin-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(94, 23, 235, 0.4);
    border-bottom-color: transparent !important;
}

.admin-btn svg {
    width: 16px;
    height: 16px;
}

.admin-btn-mobile {
    display: flex !important;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, var(--purple-dark) 0%, #7c3aed 100%);
    color: var(--white) !important;
    padding: 0.75rem var(--spacing-md);
    margin: 0.5rem var(--spacing-md);
    border-radius: var(--border-radius);
    font-weight: 600;
}

.admin-btn-mobile svg {
    width: 18px;
    height: 18px;
}

.admin-dropdown-link {
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
    color: var(--purple-dark) !important;
    font-weight: 600;
}

.admin-dropdown-link svg {
    width: 16px;
    height: 16px;
}

.admin-dropdown-link:hover {
    background: rgba(94, 23, 235, 0.08);
}
