/* Portal-specific styles */
/* static/css/pages/portal.css */

/* Login Page Styles */
.portal-container {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Clears the fixed site header (the old padding-top was overridden by this shorthand). */
    padding: 96px 1rem 2rem;
}

.portal-card {
    background: white;
    padding: 3rem 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

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

.portal-header h1 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 2rem;
}

.portal-header p {
    color: #7f8c8d;
    margin: 0;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #3498db;
}

.btn-login {
    width: 100%;
    background: linear-gradient(135deg, #9aa9b8 0%, #7393B3 100%);
    color: white;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.btn-login:hover {
    transform: translateY(-2px);
}

.portal-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e1e8ed;
}

.portal-footer a {
    color: #3498db;
    text-decoration: none;
}

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

/* Dashboard Styles */


.dashboard-container {
    margin-top: 6rem; /* Push content below fixed header */
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 2rem;
}

.dashboard-header {
    margin-bottom: 2rem;
}

.dashboard-header h1 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #3498db;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.dashboard-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.main-content, .sidebar {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.sidebar h3 {
    margin-top: 0;
    color: #2c3e50;
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar li {
    margin-bottom: 0.5rem;
}

.sidebar a {
    color: #3498db;
    text-decoration: none;
    padding: 0.5rem 0;
    display: block;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.sidebar a:hover {
    background-color: #f8f9fa;
    padding-left: 0.5rem;
}

/* Alert styles for forms */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.alert-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.alert-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

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

    .portal-card {
        padding: 2rem 1.5rem;
    }

    .dashboard-stats {
        grid-template-columns: 1fr;
    }
}

/* Thai language support */
.thai-text {
    font-family: 'Sarabun', 'Noto Sans Thai', sans-serif;
    line-height: 1.6;
}

/* Language-specific adjustments */
[lang="th"] .portal-header h1 {
    font-size: 1.8rem; /* Slightly smaller for Thai text */
}

[lang="th"] .form-group label {
    font-size: 0.95rem;
}