/* Auth section */
.auth-section {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 0;
}

.auth-card {
    max-width: 440px;
    margin: 0 auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    padding: 40px;
    width: 100%;
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-header h1 {
    font-size: 28px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 8px;
}

.auth-header p {
    font-size: 15px;
    color: #666;
    margin: 0;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.auth-field label {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.auth-field input {
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s;
    outline: none;
}

.auth-field input:focus {
    border-color: #007AFF;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.auth-error {
    font-size: 13px;
    color: #e74c3c;
}

.auth-options {
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #555;
    cursor: pointer;
}

.auth-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.auth-btn {
    padding: 14px 24px;
    background: #007AFF;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.auth-btn:hover {
    background: #0056cc;
}

.auth-btn-logout {
    background: #e74c3c;
}

.auth-btn-logout:hover {
    background: #c0392b;
}

.auth-links {
    text-align: center;
}

.auth-links a {
    font-size: 14px;
    color: #007AFF;
    text-decoration: none;
}

.auth-links a:hover {
    text-decoration: underline;
}

/* Chat floating button */
.chat-float-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #003366;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 51, 102, 0.3);
    z-index: 1000;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.chat-float-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(0, 51, 102, 0.4);
    background: #0055A5;
}

/* Chat popup */
.chat-popup {
    position: fixed;
    bottom: 90px;
    right: 24px;
    width: 380px;
    max-width: calc(100vw - 48px);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
}

.chat-popup-header {
    background: #003366;
    color: #fff;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-popup-title {
    font-size: 16px;
    font-weight: 600;
}

.chat-popup-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    opacity: 0.8;
}

.chat-popup-close:hover {
    opacity: 1;
}

.chat-popup-body {
    padding: 20px;
}

.chat-popup-user {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.chat-popup-user-name {
    font-weight: 500;
    color: #333;
}

.chat-popup-dashboard-link {
    font-size: 13px;
    color: #003366;
    text-decoration: none;
}

.chat-popup-dashboard-link:hover {
    text-decoration: underline;
}

.chat-popup-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.chat-popup-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.chat-popup-field label {
    font-size: 13px;
    font-weight: 500;
    color: #555;
}

.chat-popup-field input,
.chat-popup-field textarea {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    resize: vertical;
    transition: border-color 0.2s;
}

.chat-popup-field input:focus,
.chat-popup-field textarea:focus {
    outline: none;
    border-color: #003366;
    box-shadow: 0 0 0 2px rgba(0, 51, 102, 0.1);
}

.chat-popup-btn {
    padding: 12px 20px;
    background: #003366;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.chat-popup-btn:hover {
    background: #0055A5;
}

.chat-popup-success {
    text-align: center;
    padding: 20px 0;
}

.chat-popup-success p {
    margin-top: 12px;
    color: #555;
    font-size: 14px;
    line-height: 1.5;
}

.chat-popup-hint {
    text-align: center;
    font-size: 13px;
    color: #888;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
    margin-top: 12px;
}

.chat-popup-hint a {
    color: #003366;
    text-decoration: none;
}

.chat-popup-hint a:hover {
    text-decoration: underline;
}

/* Dashboard */
.dashboard-section {
    padding: 40px 0 60px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.dashboard-header h1 {
    font-size: 28px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.dashboard-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dashboard-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
}

.dashboard-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dashboard-avatar-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #007AFF;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 600;
}

.dashboard-name {
    font-weight: 600;
    color: #1a1a1a;
}

.dashboard-login {
    font-size: 13px;
    color: #888;
}

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.badge-admin {
    background: #e74c3c;
    color: #fff;
}

.badge-user {
    background: #007AFF;
    color: #fff;
}

.badge-active {
    background: #27ae60;
    color: #fff;
}

.badge-inactive {
    background: #95a5a6;
    color: #fff;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.dashboard-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.dashboard-card-wide {
    grid-column: 1 / -1;
}

.dashboard-card h3 {
    font-size: 16px;
    font-weight: 600;
    padding: 16px 20px;
    margin: 0;
    border-bottom: 1px solid #f0f0f0;
    color: #1a1a1a;
}

.dashboard-card-content {
    padding: 16px 20px;
}

.dashboard-field {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
}

.dashboard-field:last-child {
    border-bottom: none;
}

.dashboard-label {
    color: #888;
    font-size: 14px;
}

.dashboard-empty {
    color: #aaa;
    font-style: italic;
    text-align: center;
    padding: 20px 0;
}

.dashboard-btn {
    display: inline-block;
    padding: 10px 20px;
    background: #007AFF;
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
}

.dashboard-btn:hover {
    background: #0056cc;
}

.dashboard-actions {
    text-align: center;
}

/* Admin table */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.admin-table th {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 2px solid #e0e0e0;
    font-weight: 600;
    color: #555;
    font-size: 13px;
}

.admin-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
}

.admin-table tr:hover td {
    background: #f9f9f9;
}

/* Responsive */
@media (max-width: 768px) {
    .auth-card {
        margin: 0 16px;
        padding: 28px 24px;
    }

    .auth-header h1 {
        font-size: 24px;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }

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

    .admin-table {
        font-size: 12px;
    }

    .admin-table th,
    .admin-table td {
        padding: 8px 6px;
    }

    .chat-float-btn {
        bottom: 16px;
        right: 16px;
        width: 48px;
        height: 48px;
    }

    .chat-float-btn svg {
        width: 24px;
        height: 24px;
    }

    .chat-popup {
        bottom: 76px;
        right: 16px;
        width: calc(100vw - 32px);
    }
}
