/* ==========================================================================
   17. Login Page Styles
   ========================================================================== */
.authentication-bg {
    position: relative;
    background: var(--bg-body);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.authentication-bg .container-fluid {
    max-width: 100%;
    padding: 0;
}

/* Make the login column full-width below the lg breakpoint (992px),
   matching when the branding panel (d-lg-flex) disappears. This keeps
   the login form centered across tablet widths instead of stuck at 50%. */
@media (max-width: 991.98px) {
    .authentication-bg .col-lg-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

.login-branding-panel {
    background: linear-gradient(135deg, #4A5A73 0%, #5A6A85 50%, #6B7B98 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px;
    color: #fff;
    min-height: 100vh;
}

.login-branding-panel h2 {
    font-size: 28px;
    font-weight: 300;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.login-branding-panel p {
    font-size: 14px;
    opacity: 0.8;
    line-height: 1.6;
    margin-bottom: 32px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 24px;
}

.feature-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 18px;
}

.feature-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.feature-desc {
    font-size: 13px;
    opacity: 0.7;
    line-height: 1.5;
}

.authentication-bg .card {
    border: 1px solid var(--border);
    box-shadow: var(--shadow-card);
    border-radius: var(--radius-lg);
}

.authentication-bg .card-body {
    padding: 32px;
}

.authentication-bg .btn-primary {
    padding: 10px 16px;
    font-weight: 500;
    width: 100%;
}

.authentication-bg .spinner-border-sm {
    width: 14px;
    height: 14px;
    border-width: 2px;
}

.auth-logo img {
    max-height: 60px;
    object-fit: contain;
}

.input-custom-icon {
    position: relative;
}

.input-custom-icon input.form-control {
    padding-left: 40px;
}

.input-custom-icon .bx {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: var(--text-muted);
    z-index: 4;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--text-muted);
    z-index: 4;
    font-size: 18px;
    padding: 0;
    line-height: 1;
    background: none;
    border: none;
}

.password-toggle:hover {
    color: var(--text-primary);
}

/* ==========================================================================
   18. Profile Page Styles — Two-Column Split Layout
   ========================================================================== */

/* --- Two-Column Layout --- */
.profile-layout {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 24px;
}

/* --- Left Sidebar --- */
.profile-sidebar {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 32px 24px;
    height: fit-content;
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.sidebar-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 500;
    margin-bottom: 16px;
}

.sidebar-name {
    font-size: 20px;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0 0 4px;
}

.sidebar-email {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0 0 20px;
    word-break: break-all;
}

.sidebar-divider {
    width: 100%;
    height: 1px;
    background: var(--border-subtle);
    margin: 0 0 20px;
}

.info-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: left;
    padding: 0 8px;
}

.info-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.info-value {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.info-value.status-active {
    color: var(--success);
}

/* --- Right Column --- */
.profile-main {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

#profile-main-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

#profile-main-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* --- Main Cards --- */
.main-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.main-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-subtle);
    background: rgba(230, 236, 244, 0.3);
}

.main-card-header i {
    font-size: 18px;
    color: var(--accent);
}

.main-card-header h6 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}

.main-card-body {
    padding: 24px;
}

/* --- Premium Card (Variation 05 - Executive Premium) --- */
.premium-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    position: relative;
    overflow: hidden;
}

.premium-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(107, 123, 152, 0.3), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.premium-card:hover {
    border-color: rgba(44, 51, 69, 0.08);
    box-shadow: var(--shadow-glow);
}

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

.card-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 12px;
}

.api-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.api-input-group {
    display: flex;
    align-items: stretch;
}

.api-input {
    flex: 1;
    padding: 12px 16px;
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-right: none;
    border-radius: var(--radius) 0 0 var(--radius);
    outline: none;
}

.api-copy-btn {
    padding: 12px 20px;
    border: 1px solid var(--accent);
    border-radius: 0 var(--radius) var(--radius) 0;
    background: var(--accent);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.api-copy-btn:hover:not(:disabled) {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

.api-copy-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.helper-text {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
}

/* --- Dashboard Stats Section Header (Variation 02) --- */
.section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 4px;
}

.section-header i {
    font-size: 16px;
    color: var(--accent);
}

.section-header h6 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}

/* --- Profile Card (Variation 02 style) --- */
.profile-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
}

.profile-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(107, 123, 152, 0.3), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.profile-card:hover {
    border-color: rgba(44, 51, 69, 0.08);
    box-shadow: var(--shadow-glow);
}

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

.profile-card:last-child {
    margin-bottom: 0;
}

/* --- Settings Row --- */
.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
}

.setting-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.setting-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    background: var(--bg-elevated);
    color: var(--text-muted);
    font-size: 20px;
}

.setting-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.setting-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.setting-desc {
    font-size: 13px;
    color: var(--text-muted);
}

.setting-btn {
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-surface);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.setting-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--accent);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .profile-layout {
        grid-template-columns: 1fr;
    }

    .profile-sidebar {
        padding: 24px 20px;
    }

    .main-card-body {
        padding: 20px;
    }

    .setting-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .api-input-group {
        flex-direction: column;
    }

    .api-input {
        border-right: 1px solid var(--border);
        border-radius: var(--radius) var(--radius) 0 0;
    }

    .api-copy-btn {
        border-radius: 0 0 var(--radius) var(--radius);
        border-top: none;
        justify-content: center;
    }
}

/* ==========================================================================
   19. Users Page Styles
   ========================================================================== */
.api-key-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.api-key-group .form-control {
    font-family: var(--font-mono);
    font-size: 12px;
    background: var(--bg-elevated);
}

.action-btn-group {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

/* ==========================================================================
   34. Dashboard Stats + Footer Theme Toggle — Responsive Overrides
   These are placed here (last-loaded stylesheet) so they reliably override
   the base .stats-grid rule in components.css (same specificity, later file).
   ========================================================================== */

/* Tablet (769–1024px): balance columns so the middle "Total Storage" card
   has room for "0 B / 1000.00 MB" on one line. */
@media (min-width: 769px) and (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr 1.5fr;
    }
}

/* Mobile (≤768px): stack every stat card on its own row; the upload card
   already spans the full width via its grid-column rule. */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    /* Keep the theme toggle horizontally centered when the footer stacks
       vertically (flex-direction: column) on mobile. */
    .site-footer-inner .theme-toggle {
        align-self: center;
    }

    /* Center the dashboard pagination footer when it stacks on mobile.
       Overrides base.css's align-items: flex-start / justify-content:
       space-between so neither sub-group clings to the edges. */
    .pagination-footer {
        align-items: center;
        text-align: center;
    }

    .pagination-right-group {
        justify-content: center;
    }

    #pagination-info {
        text-align: center;
    }
}

