/* ==========================================================================
   BeyondDev Authentication Portal - Styling
   ========================================================================== */

/* Page layout specific modifications */
.auth-page-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-color: var(--bg-dark);
}

.auth-main-container {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 1rem 60px 1rem;
    position: relative;
    z-index: 5;
}

.auth-card-wrapper {
    width: 100%;
    max-width: 480px;
    perspective: 1000px;
}

/* Auth Card Glassmorphism details */
.auth-card {
    background: rgba(10, 15, 25, 0.75);
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 2px 1px rgba(255, 255, 255, 0.05) inset;
    border-radius: 20px;
    padding: 3rem 2.5rem;
    overflow: hidden;
    position: relative;
    transition: transform var(--transition-slow), border-color var(--transition-normal);
}

.auth-card:hover {
    border-color: rgba(239, 199, 4, 0.25);
    box-shadow: 0 25px 60px rgba(43, 29, 117, 0.3), 0 0 2px 1px rgba(239, 199, 4, 0.1) inset;
}

/* Navigation Tabs */
.auth-tabs {
    display: flex;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 2.25rem;
}

.auth-tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    padding: 1rem;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    position: relative;
    transition: color var(--transition-fast);
}

.auth-tab-btn:hover {
    color: var(--text-light);
}

.auth-tab-btn::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--accent-gold);
    transition: width var(--transition-normal);
}

.auth-tab-btn.active {
    color: var(--accent-gold);
}

.auth-tab-btn.active::after {
    width: 100%;
}

/* Views Transitions */
.auth-view {
    display: none;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.auth-view.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.auth-tab-content {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.auth-tab-content.active {
    display: block;
    opacity: 1;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h2 {
    font-family: var(--font-tech);
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.auth-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Custom Password Toggle & Inputs Adjustments */
.label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.forgot-pwd-link {
    font-size: 0.8rem;
    color: var(--accent-gold);
    transition: color var(--transition-fast);
}

.forgot-pwd-link:hover {
    color: var(--hover-yellow);
    text-decoration: underline;
}

.pwd-toggle {
    position: absolute;
    right: 14px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.95rem;
    padding: 5px;
    transition: color var(--transition-fast);
    z-index: 5;
}

.pwd-toggle:hover {
    color: var(--text-light);
}

.demo-credentials {
    margin-top: 2rem;
    padding: 1rem;
    border-radius: 8px;
    background: rgba(43, 29, 117, 0.15);
    border: 1px dashed rgba(43, 29, 117, 0.4);
    font-size: 0.82rem;
    text-align: center;
    color: #b3a7ff;
}

.demo-credentials code {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    color: var(--accent-gold);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    font-size: 0.88rem;
    color: var(--text-muted);
    width: 100%;
    justify-content: center;
    transition: color var(--transition-fast);
}

.back-link:hover {
    color: var(--accent-gold);
}

.form-feedback {
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    display: none;
}

.form-feedback.error {
    background: rgba(255, 122, 122, 0.1);
    border: 1px solid rgba(255, 122, 122, 0.3);
    color: #ff7a7a;
}

.form-feedback.success {
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.3);
    color: #4ade80;
}

/* ==========================================================================
   DevMail Client Simulator (FLOATING WIDGET)
   ========================================================================== */
.devmail-container {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 380px;
    background: rgba(6, 10, 18, 0.95);
    border: 1px solid rgba(43, 29, 117, 0.6);
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8), 0 0 15px rgba(43, 29, 117, 0.3);
    z-index: 1000;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-normal), max-height var(--transition-normal);
    max-height: 480px;
}

.devmail-container.minimized {
    max-height: 52px;
}

.devmail-header {
    background: linear-gradient(90deg, #100b2e 0%, #1e1550 100%);
    border-bottom: 1px solid rgba(43, 29, 117, 0.8);
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.devmail-header .header-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.header-mail-icon {
    color: var(--accent-gold);
    font-size: 1rem;
    animation: emailGlow 2s infinite alternate ease-in-out;
}

@keyframes emailGlow {
    0% { filter: drop-shadow(0 0 2px var(--accent-gold-glow)); }
    100% { filter: drop-shadow(0 0 8px var(--accent-gold)); }
}

.devmail-header .badge {
    background: var(--accent-gold);
    color: var(--text-dark);
    font-family: var(--font-tech);
    font-weight: 900;
    font-size: 0.75rem;
    padding: 0.1rem 0.5rem;
    border-radius: 50px;
    box-shadow: 0 0 10px var(--accent-gold-glow);
}

.devmail-header .badge.zero {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    box-shadow: none;
}

.header-actions button {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.9rem;
    transition: color var(--transition-fast);
}

.header-actions button:hover {
    color: var(--text-light);
}

#devmail-arrow {
    transition: transform var(--transition-normal);
}

.devmail-container.minimized #devmail-arrow {
    transform: rotate(180deg);
}

/* Body and lists styles */
.devmail-body {
    height: 360px;
    overflow-y: auto;
    background: #02050a;
}

.mail-list {
    display: flex;
    flex-direction: column;
}

.empty-inbox {
    padding: 3rem 2rem;
    text-align: center;
    color: var(--text-muted);
}

.empty-inbox i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.empty-inbox p {
    font-size: 0.95rem;
    font-weight: 600;
}

.empty-inbox p.sub {
    font-size: 0.8rem;
    margin-top: 0.5rem;
    opacity: 0.7;
    line-height: 1.4;
}

/* Mail items styling */
.mail-item {
    padding: 1.15rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.mail-item:hover {
    background: rgba(43, 29, 117, 0.15);
}

.mail-item.unread {
    background: rgba(239, 199, 4, 0.02);
    border-left: 3px solid var(--accent-gold);
}

.mail-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.mail-item-from {
    font-weight: 700;
    font-size: 0.88rem;
    color: #e2e8f0;
}

.mail-item-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.mail-item-subject {
    font-size: 0.82rem;
    color: var(--accent-gold);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mail-item-preview {
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 0.25rem;
}

/* Mail Viewer panel styling */
.mail-viewer {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.btn-back-list {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 0.4rem 0.85rem;
    border-radius: 4px;
    font-size: 0.78rem;
    cursor: pointer;
    align-self: flex-start;
    margin-bottom: 1.25rem;
    transition: all var(--transition-fast);
}

.btn-back-list:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
}

.mail-content-display {
    border-top: 1px solid var(--glass-border);
    padding-top: 1.25rem;
}

.mail-meta {
    margin-bottom: 1.5rem;
}

.mail-meta-row {
    font-size: 0.82rem;
    margin-bottom: 0.35rem;
    color: var(--text-muted);
}

.mail-meta-row strong {
    color: #e2e8f0;
}

.mail-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.mail-body-text {
    font-size: 0.88rem;
    color: #cbd5e1;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.mail-action-area {
    text-align: center;
    margin: 1.75rem 0;
}

.mail-btn {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    background: var(--accent-gold);
    color: var(--text-dark);
    font-weight: 700;
    font-size: 0.85rem;
    border-radius: 6px;
    cursor: pointer;
    box-shadow: 0 4px 12px var(--accent-gold-glow);
    transition: all var(--transition-fast);
}

.mail-btn:hover {
    background: var(--hover-yellow);
    box-shadow: 0 6px 18px rgba(255, 233, 48, 0.4);
    transform: translateY(-1px);
}

/* Footer clear inbox button */
.devmail-footer {
    padding: 10px 15px;
    border-top: 1px solid var(--glass-border);
    background: #02050a;
    display: flex;
    justify-content: flex-end;
}

.btn-clear-inbox {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all var(--transition-fast);
}

.btn-clear-inbox:hover {
    color: #ff7a7a;
    background: rgba(255, 122, 122, 0.05);
}

/* Toast Notifications styling */
.toast-container {
    position: fixed;
    top: 90px;
    right: 25px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 1050;
    pointer-events: none;
}

.toast-item {
    background: rgba(10, 15, 25, 0.95);
    border-left: 4px solid var(--accent-gold);
    border-radius: 6px;
    padding: 1rem 1.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 320px;
    transform: translateX(120%);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: auto;
}

.toast-item.show {
    transform: translateX(0);
}

.toast-item.success {
    border-left-color: #4ade80;
}

.toast-item.success i {
    color: #4ade80;
}

.toast-item.error {
    border-left-color: #ff7a7a;
}

.toast-item.error i {
    color: #ff7a7a;
}

.toast-item.info i {
    color: #60a5fa;
}

.toast-item i {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.toast-msg {
    font-size: 0.88rem;
    line-height: 1.4;
}

/* ==========================================================================
   Media Queries
   ========================================================================== */
@media (max-width: 480px) {
    .auth-card {
        padding: 2.25rem 1.5rem;
        border-radius: 12px;
    }
    
    .form-row.split {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .devmail-container {
        width: calc(100vw - 30px);
        left: 15px;
        right: 15px;
        bottom: 15px;
    }
    
    .toast-container {
        left: 15px;
        right: 15px;
        top: 20px;
    }
    
    .toast-item {
        width: 100%;
    }
}
