/* Modern VFEmail Redesign */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --secondary-color: #64748b;
    --accent-color: #0ea5e9;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --background: #ffffff;
    --surface: #f8fafc;
    --surface-elevated: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: var(--text-primary);
    background: var(--surface);
    line-height: 1.6;
    font-size: 14.4px;
}

/* Header Styles */
.header-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
}

.header-container .alert-box {
    margin: 0;
}

form#login {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}

.login-grid {
    display: grid;
    gap: 0.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.form-group label {
    font-size: 0.675rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
}

.form-group input[type="text"],
.form-group input[type="password"] {
    padding: 0.375rem 0.625rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.7875rem;
    transition: all 0.2s;
    background: var(--background);
    line-height: 1.4;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-hint {
    font-size: 0.675rem;
    color: var(--text-muted);
}

.form-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.675rem;
    line-height: 1.2;
}

.radio-option input[type="radio"] {
    width: 0.875rem;
    height: 0.875rem;
    cursor: pointer;
}

.select-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.select-group label {
    font-size: 0.61875rem;
    font-weight: 600;
    color: var(--text-secondary);
    line-height: 1.2;
}

.select-group select {
    padding: 0.375rem 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.73125rem;
    background: var(--background);
    cursor: pointer;
    line-height: 1.4;
}

.login-actions {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-top: 0;
}

.button-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: stretch;
}

.button-row .btn-primary,
.button-row .btn-signup {
    width: 100%;
    text-align: center;
}

.btn-primary {
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.7875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

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

.btn-primary:active {
    transform: translateY(0);
}

.forgot-password {
    text-align: center;
    font-size: 0.675rem;
    line-height: 1.2;
}

.forgot-password a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.forgot-password a:hover {
    text-decoration: underline;
}

.loading-state {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
}

/* Header Actions */
.header-actions {
    display: none;
}

.btn-signup {
    padding: 0.5rem 1rem;
    background: var(--success-color);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.7875rem;
    transition: all 0.2s;
    display: inline-block;
}

.btn-signup:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Navigation Styles */
.site-nav {
    background: var(--primary-color);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.nav-links {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 0.5rem 0;
}

.nav-links a {
    color: white;
    text-decoration: none;
    padding: 0.625rem 1rem;
    font-size: 0.7875rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}

.nav-links a:hover {
    background: var(--primary-dark);
}

.search-form {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem 0;
}

.search-form input[type="text"] {
    padding: 0.5rem 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 0.7875rem;
}

.search-form input[type="text"]::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-form input[type="submit"] {
    padding: 0.5rem 1rem;
    background: white;
    color: var(--primary-color);
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.7875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.search-form input[type="submit"]:hover {
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

/* Main Content */
.main-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 1.5rem;
}

.content-layout {
    display: grid;
    grid-template-columns: 260px 1fr 340px;
    gap: 1.5rem;
    align-items: start;
}

/* Sidebar Styles */
.sidebar {
    background: var(--surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 1rem;
    box-shadow: none;
}

.sidebar-logo {
    text-align: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-logo img {
    max-width: 100%;
    height: auto;
    background-color: transparent;
}

.sidebar h3 {
    font-size: 0.7875rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 600;
}

.crypto-badges {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

.crypto-badges img {
    max-width: 50%;
    height: auto;
    border-radius: var(--radius-sm);
}

/* Main Content Section */
.main-content {
    background: var(--surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 1.5rem;
    box-shadow: none;
    text-align: left;
}

.alert-box {
    background: rgba(239, 68, 68, 0.1);
    border-left: 3px solid var(--danger-color);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 600;
    color: var(--danger-color);
}

.feature-highlight {
    background: rgba(14, 165, 233, 0.05);
    border-left: 3px solid var(--accent-color);
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin-bottom: 1.25rem;
    position: relative;
}

.feature-highlight h3 {
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.tooltip-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    background: var(--accent-color);
    color: white;
    border-radius: 50%;
    font-size: 0.675rem;
    font-weight: bold;
    margin-left: 0.25rem;
    cursor: help;
}

.content-text {
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
}

.content-text p {
    margin-bottom: 0.75rem;
}

/* Login Sidebar & News Section */
.login-sidebar,
.news-section {
    background: var(--surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 1rem;
    box-shadow: none;
}

.login-sidebar h3,
.news-section h3 {
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    font-weight: 600;
}

.login-sidebar form#login {
    padding: 0;
    border: none;
    background: transparent;
}

.news-item {
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

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

.news-date {
    font-size: 0.675rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.news-content {
    font-size: 0.7875rem;
    color: var(--text-secondary);
}

/* Account Grid */
.account-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.account-card {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: all 0.2s;
}

.account-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.account-card-header {
    background: var(--primary-color);
    color: white;
    padding: 0.75rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.account-card-body {
    padding: 1rem;
}

.account-card-body dl {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.account-card-body dt {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.7875rem;
}

.account-card-body dd {
    color: var(--text-secondary);
    font-size: 0.7875rem;
    margin-left: 0;
}

/* Account Table (acctgridsm.php) */
#account {
    margin: 1.5rem 0;
}

#account table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.7875rem;
    line-height: 1.6;
    table-layout: auto;
}

#account table td {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    vertical-align: top;
    min-width: 120px;
    white-space: normal;
}

#account table tr:first-child td {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
}

#account table tr:nth-child(even) {
    background: var(--surface);
}

#account table td.title {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
    padding: 0.75rem;
}

#account table td.title a {
    color: white;
    text-decoration: none;
}

#account table td.title a:hover {
    text-decoration: underline;
}

#account table font[size="-2"],
#account table font[size="-1"] {
    font-size: inherit !important;
}

#account #supq {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    background: var(--accent-color);
    color: white;
    border-radius: 50%;
    text-align: center;
    font-size: 0.675rem;
    line-height: 1rem;
    margin-left: 0.25rem;
    cursor: help;
    vertical-align: middle;
}

#account DIV {
    display: inline-block;
}

/* vfemailaccts.php page styling */
#content {
    font-size: 0.7875rem;
    line-height: 1.6;
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem;
}

#content table {
    font-size: 0.7875rem;
    border-collapse: collapse;
}

#content table td {
    padding: 0.5rem;
    vertical-align: top;
}

#content table tr[bgcolor="#e6e6ff"] {
    background: var(--surface);
}

#content table tr[bgcolor="#e6e6e6"] {
    background: #e6e6e6;
}

/* Override all inline font size attributes */
#content font[size="1"],
#content font[size="-1"],
#content font[size="-2"] {
    font-size: 0.675rem !important;
}

#content font[size="2"] {
    font-size: 0.7875rem !important;
}

#content font[size="3"],
#content font[size="+1"] {
    font-size: 0.9rem !important;
}

#content a {
    color: var(--primary-color);
    text-decoration: none;
}

#content a:hover {
    text-decoration: underline;
}

/* Footer */
.site-footer {
    max-width: 1600px;
    margin: 1.5rem auto 0;
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.7875rem;
}

/* Tooltip */
#dhtmltooltip {
    position: absolute;
    left: -1000px;
    top: 0;
    max-width: 320px;
    background: #1e293b;
    color: #ffffff;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    font-size: 0.7875rem;
    line-height: 1.5;
    z-index: 10000;
    visibility: hidden;
    pointer-events: none;
    display: block;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .content-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .sidebar,
    .news-section {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .header-container {
        padding: 0 1rem;
    }

    .nav-container {
        padding: 0 1rem;
        flex-direction: column;
    }

    .nav-links {
        width: 100%;
        flex-direction: column;
        gap: 0;
    }

    .nav-links a {
        border-radius: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .search-form {
        width: 100%;
    }

    .search-form input[type="text"] {
        flex: 1;
    }

    .main-container {
        padding: 1rem;
    }

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

@media (max-width: 480px) {
    .main-content {
        padding: 1rem;
    }

    .login-sidebar,
    .sidebar {
        padding: 0.75rem;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}
