/* Bond007 - Dark Theme */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #0c1021;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: #e4e4e7;
}

/* ===== HEADER ===== */
header {
    position: sticky;
    top: 0;
    background-color: rgba(12, 16, 33, 0.9);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid #1e2a45;
    padding: 14px 20px;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-size: 20px;
    font-weight: 700;
    color: #e4e4e7;
    letter-spacing: 1px;
}

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

.user-info-hidden {
    display: none;
}

.welcome-message {
    font-size: 13px;
    color: #94a3b8;
}

.btn-signout {
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 500;
    color: #e4e4e7;
    background-color: transparent;
    border: 1px solid #334155;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-signout:hover {
    background-color: #1e2a45;
    border-color: #475569;
}

.btn-icon {
    padding: 7px;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-icon:hover {
    background-color: #1e2a45;
    color: #e4e4e7;
}

/* ===== MAIN - LOGIN MODE ===== */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
}

#main-content {
    background: #161c2d;
    border-radius: 16px;
    border: 1px solid #1e2a45;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    padding: 48px;
    max-width: 480px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ===== FOOTER ===== */
footer {
    background-color: rgba(12, 16, 33, 0.8);
    border-top: 1px solid #1e2a45;
    padding: 10px 20px;
    text-align: center;
    color: #475569;
    font-size: 12px;
}

#license_info {
    color: #475569;
    font-size: 11px;
}

/* ===== CHAT MODE OVERRIDES ===== */
body.chat-mode header {
    display: none;
}

body.chat-mode footer {
    display: none;
}

body.chat-mode main {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 20px 40px 16px;
    background: #0c1021;
}

body.chat-mode #main-content {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    max-width: 560px;
    width: 100%;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

body.chat-mode .login-container {
    background-color: #161c2d;
    border: 1px solid #1e2a45;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 560px;
}

/* ===== LOGO SECTION ===== */
.logo-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.logo-image {
    width: 130px;
    height: 130px;
    border-radius: 28px;
    filter: drop-shadow(0 0 24px rgba(59, 130, 246, 0.5));
}

/* ===== LOGIN FORM ===== */
.login-container {
    width: 100%;
    max-width: 380px;
}

.login-title {
    font-size: 26px;
    font-weight: 700;
    color: #e4e4e7;
    text-align: center;
    margin-bottom: 24px;
}

.form-step-indicator {
    text-align: center;
    font-size: 12px;
    color: #94a3b8;
    margin-bottom: 16px;
    font-weight: 500;
}

.login-message {
    min-height: 20px;
    margin-bottom: 16px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
    display: none;
}

.login-message.error {
    display: block;
    background-color: #1f1515;
    color: #f87171;
    border: 1px solid #7f1d1d;
}

.login-message.success {
    display: block;
    background-color: #0f1f2f;
    color: #60a5fa;
    border: 1px solid #1e3a8a;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    font-size: 13px;
    font-weight: 500;
    color: #94a3b8;
}

.form-input {
    padding: 11px 14px;
    font-size: 15px;
    color: #e4e4e7;
    background-color: #1e2a45;
    border: 1px solid #334155;
    border-radius: 8px;
    outline: none;
    transition: all 0.2s;
    font-family: inherit;
}

.form-input:focus {
    background-color: #1a2540;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.form-input::placeholder {
    color: #475569;
}

.btn-primary {
    padding: 11px 22px;
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    background-color: #3b82f6;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-primary:hover {
    background-color: #2563eb;
}

.btn-primary:active {
    background-color: #1d4ed8;
}

.btn-primary:disabled {
    background-color: #334155;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-loader {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.btn-secondary {
    padding: 11px 22px;
    font-size: 15px;
    font-weight: 500;
    color: #e4e4e7;
    background-color: transparent;
    border: 1px solid #334155;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    margin-top: 6px;
}

.btn-secondary:hover {
    background-color: #1e2a45;
    border-color: #475569;
}

.btn-secondary:disabled {
    color: #475569;
    border-color: #1e2a45;
    cursor: not-allowed;
    opacity: 0.6;
}

.back-arrow-btn {
    padding: 6px 10px;
    font-size: 18px;
    font-weight: 600;
    color: #94a3b8;
    background-color: transparent;
    border: 1px solid #334155;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    line-height: 1;
}

.back-arrow-btn:hover {
    color: #e4e4e7;
    background-color: #1e2a45;
    border-color: #475569;
}

.back-arrow-btn:active {
    background-color: #0f1f2f;
    border-color: #334155;
}

.register-link {
    text-align: center;
    font-size: 13px;
    color: #64748b;
}

.register-link a {
    color: #60a5fa;
    text-decoration: none;
    font-weight: 500;
}

.register-link a:hover {
    text-decoration: underline;
}

.button-row-center {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
}

.profile-email-display {
    padding: 10px 0;
    font-size: 15px;
    color: #94a3b8;
}

/* ===== CHAT CONTAINER ===== */
.chat-container {
    width: 100%;
    height: calc(100vh - 200px);
    min-height: 400px;
    max-height: 680px;
    display: flex;
    flex-direction: column;
    background: #161c2d;
    border-radius: 16px;
    border: 1px solid #1e2a45;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    overflow: hidden;
}

/* Chat Header */
.chat-header {
    padding: 14px 18px;
    border-bottom: 1px solid #1e2a45;
    background: #1a2035;
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 16px 16px 0 0;
}

.chat-header-left {}

.chat-title {
    font-size: 15px;
    font-weight: 700;
    color: #e4e4e7;
    margin: 0;
}

.chat-status {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 2px;
}

.chat-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: #22c55e;
}

.chat-status-text {
    font-size: 12px;
    color: #22c55e;
}

.chat-header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.chat-help-btn {
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #f87171;
    background-color: #2d0f0f;
    border: 1px solid #7f1d1d;
    border-radius: 7px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.chat-help-btn:hover {
    background-color: #3f1515;
}

.chat-logout-btn {
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    color: #e4e4e7;
    background: transparent;
    border: 1px solid #334155;
    border-radius: 7px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.chat-logout-btn:hover {
    background-color: #1e2a45;
    border-color: #475569;
}

/* Chat Messages */
.chat-messages-wrapper {
    flex: 1;
    overflow-y: auto;
    background: #0f1525;
    position: relative;
}

.chat-messages {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 100%;
}

.chat-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #475569;
    gap: 10px;
}

.chat-empty-text {
    font-size: 14px;
}

.chat-message {
    display: flex;
    gap: 10px;
    max-width: 88%;
    animation: messageSlideIn 0.2s ease-out;
}

@keyframes messageSlideIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.chat-message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.chat-message.assistant {
    align-self: flex-start;
}

.chat-message-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

.chat-message.user .chat-message-avatar {
    background: linear-gradient(135deg, #475569, #334155);
    box-shadow: none;
}

.chat-message-content {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.chat-message-bubble {
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
}

.chat-message.user .chat-message-bubble {
    background: #1e40af;
    color: #e2e8f0;
    border-bottom-right-radius: 4px;
}

.chat-message.assistant .chat-message-bubble {
    background: #1a2035;
    color: #e4e4e7;
    border: 1px solid #1e2a45;
    border-bottom-left-radius: 4px;
}

.chat-message.error .chat-message-bubble {
    background: #1f1515;
    color: #f87171;
    border: 1px solid #7f1d1d;
}

.chat-message-time {
    font-size: 11px;
    color: #475569;
    padding: 0 4px;
}

.chat-message.user .chat-message-time {
    text-align: right;
}

/* Chat Input */
.chat-input-wrapper {
    padding: 12px 16px;
    border-top: 1px solid #1e2a45;
    background: #161c2d;
    flex-shrink: 0;
}

.chat-input-container {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.chat-input {
    flex: 1;
    padding: 10px 14px;
    font-size: 14px;
    color: #e4e4e7;
    background-color: #1e2a45;
    border: 1px solid #334155;
    border-radius: 10px;
    outline: none;
    resize: none;
    max-height: 120px;
    min-height: 40px;
    font-family: inherit;
    transition: all 0.2s;
    line-height: 1.4;
}

.chat-input:focus {
    background-color: #1a2540;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.chat-input::placeholder {
    color: #475569;
}

.chat-send-btn {
    height: 40px;
    padding: 0 20px;
    border-radius: 10px;
    background: #3b82f6;
    border: none;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
    font-family: inherit;
    white-space: nowrap;
}

.chat-send-btn:hover {
    background: #2563eb;
}

.chat-send-btn:active {
    background: #1d4ed8;
}

.chat-send-btn:disabled {
    background: #334155;
    cursor: not-allowed;
}

/* Scrollbar */
.chat-messages-wrapper::-webkit-scrollbar {
    width: 5px;
}

.chat-messages-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages-wrapper::-webkit-scrollbar-thumb {
    background: #1e2a45;
    border-radius: 4px;
}

.chat-messages-wrapper::-webkit-scrollbar-thumb:hover {
    background: #334155;
}

/* Loading dots */
.chat-message-loading {
    display: flex;
    gap: 4px;
    padding: 4px 0;
    align-items: center;
}

.chat-message-loading-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #3b82f6;
    animation: loadingDot 1.4s infinite ease-in-out;
}

.chat-message-loading-dot:nth-child(1) { animation-delay: -0.32s; }
.chat-message-loading-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes loadingDot {
    0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
    40% { opacity: 1; transform: scale(1); }
}

/* Chat footer / new chat */
.chat-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #1e2a45;
}

.chat-footer-new-btn {
    background: transparent;
    border: 1px solid #334155;
    color: #94a3b8;
    padding: 5px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
    font-family: inherit;
}

.chat-footer-new-btn:hover {
    background: #1e2a45;
    color: #e4e4e7;
    border-color: #475569;
}

.chat-footer-new-btn svg {
    width: 12px;
    height: 12px;
}

.chat-confirm-message {
    font-size: 13px;
    color: #94a3b8;
}

.chat-confirm-actions {
    display: flex;
    gap: 6px;
}

.chat-confirm-btn {
    padding: 4px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    border: none;
    transition: all 0.2s;
    font-family: inherit;
}

.chat-confirm-yes {
    background: #3b82f6;
    color: white;
}

.chat-confirm-yes:hover {
    background: #2563eb;
}

.chat-confirm-no {
    background: transparent;
    color: #94a3b8;
    border: 1px solid #334155;
}

.chat-confirm-no:hover {
    background: #1e2a45;
}

/* ===== RESULTS CARDS ===== */
.icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.chat-results-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 8px 0;
    width: 100%;
}

.event-card, .attendee-card {
    background: #1a2035;
    border: 1px solid #1e2a45;
    border-radius: 10px;
    padding: 14px;
    transition: all 0.2s;
    cursor: default;
}

.event-card:hover, .attendee-card:hover {
    border-color: #3b82f6;
    background: #1e2845;
}

.event-card-header, .attendee-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #1e2a45;
}

.attendee-card-header {
    align-items: center;
    gap: 10px;
}

.event-card-title, .attendee-card-name {
    font-size: 14px;
    font-weight: 600;
    color: #e4e4e7;
    margin: 0;
    line-height: 1.3;
    flex: 1;
}

.event-card-date {
    font-size: 11px;
    color: #3b82f6;
    font-weight: 500;
    background: #0f1f3d;
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
    margin-left: 10px;
    border: 1px solid #1e3a8a;
}

.event-card-description, .event-card-location, .attendee-card-role, .attendee-card-body {
    font-size: 12px;
    color: #64748b;
    line-height: 1.5;
}

.event-card-location, .attendee-card-location, .attendee-card-event {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #64748b;
    font-size: 12px;
}

.event-card-location .icon, .attendee-card-location .icon, .attendee-card-event .icon {
    color: #3b82f6;
}

.event-card-side-events, .attendee-card-side-events {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #1e2a45;
    font-size: 12px;
    color: #64748b;
}

.event-card-side-events-title {
    font-weight: 600;
    margin-bottom: 6px;
    color: #94a3b8;
}

.event-card-side-event {
    display: flex;
    justify-content: space-between;
    padding: 5px 8px;
    background: #0f1525;
    border-radius: 4px;
    margin-bottom: 4px;
}

.attendee-card-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.attendee-card-avatar .icon {
    width: 20px;
    height: 20px;
}

.attendee-card-info {
    flex: 1;
    min-width: 0;
}

.attendee-card-qr {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.attendee-card-qr .qr-code {
    width: 70px;
    height: 70px;
    border: 1px solid #1e2a45;
    border-radius: 4px;
    padding: 3px;
    background: white;
}

.attendee-card-qr .qr-label {
    font-size: 10px;
    color: #475569;
    text-align: center;
}

/* ===== ADMIN ===== */
.admin-view {
    width: 100%;
}

.admin-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.admin-title {
    font-size: 20px;
    font-weight: 700;
    color: #e4e4e7;
}

.btn-back {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: transparent;
    border: 1px solid #334155;
    border-radius: 7px;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-back:hover {
    background-color: #1e2a45;
    color: #e4e4e7;
    border-color: #475569;
}

.admin-toolbar {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.search-box {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 180px;
    background-color: #1e2a45;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 0 12px;
}

.search-input {
    flex: 1;
    padding: 9px 0;
    font-size: 14px;
    color: #e4e4e7;
    background: transparent;
    border: none;
    outline: none;
    font-family: inherit;
}

.search-input::placeholder {
    color: #475569;
}

.toolbar-info {
    font-size: 12px;
    color: #475569;
}

.user-list-container { margin-bottom: 16px; }

.loading-spinner, .empty-message {
    text-align: center;
    padding: 40px;
    color: #475569;
    font-size: 14px;
}

.error-message {
    text-align: center;
    padding: 20px;
    color: #f87171;
    font-size: 14px;
}

.user-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.user-table th {
    text-align: left;
    padding: 9px 12px;
    color: #475569;
    font-weight: 600;
    border-bottom: 1px solid #1e2a45;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.user-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #1a2035;
    color: #e4e4e7;
    vertical-align: middle;
}

.user-table tr:hover td {
    background-color: rgba(59, 130, 246, 0.04);
}

.td-user { min-width: 180px; }
.user-email { font-weight: 500; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.user-name { font-size: 11px; color: #475569; margin-top: 2px; }

.td-roles, .td-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    padding: 10px 12px;
}

.th-actions { text-align: right; }

.badge {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
    background-color: #1e2a45;
    border: 1px solid #334155;
    color: #94a3b8;
}

.badge-admin { background-color: #1e3a8a; border-color: #3b82f6; color: #60a5fa; }
.badge-success { background-color: #14532d; border-color: #166534; color: #86efac; }
.badge-pending { background-color: #422006; border-color: #713f12; color: #fcd34d; }
.badge-blocked { background-color: #450a0a; border-color: #7f1d1d; color: #f87171; }

.text-muted { color: #475569; font-size: 12px; }

.btn-small {
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-family: inherit;
}

.btn-small.btn-secondary {
    background: transparent;
    border: 1px solid #334155;
    color: #94a3b8;
    margin-top: 0;
    padding: 4px 10px;
    font-size: 12px;
}

.btn-small.btn-secondary:hover {
    background-color: #1e2a45;
    color: #e4e4e7;
    transform: none;
}

.btn-small.btn-danger {
    background-color: #450a0a;
    border: 1px solid #7f1d1d;
    color: #f87171;
}

.btn-small.btn-danger:hover {
    background-color: #7f1d1d;
    color: #fca5a5;
}

.pagination {
    display: flex;
    justify-content: center;
    padding: 14px 0;
}

.pagination.hidden { display: none; }

.btn-load-more {
    padding: 9px 28px;
    font-size: 13px;
}

/* ===== MODALS ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.modal-overlay.modal-visible { opacity: 1; }

.modal {
    background: #161c2d;
    border: 1px solid #1e2a45;
    border-radius: 12px;
    width: 90%;
    max-width: 440px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7);
    transform: translateY(-16px);
    transition: transform 0.2s ease;
}

.modal-overlay.modal-visible .modal { transform: translateY(0); }

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 1px solid #1e2a45;
}

.modal-title {
    font-size: 16px;
    font-weight: 700;
    color: #e4e4e7;
}

.modal-close {
    background: transparent;
    border: none;
    cursor: pointer;
    color: #475569;
    font-size: 18px;
    line-height: 1;
    padding: 4px;
    transition: color 0.2s;
}

.modal-close:hover { color: #e4e4e7; }

.modal-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.modal-user-info {
    padding: 10px 12px;
    background-color: #1e2a45;
    border-radius: 6px;
    border: 1px solid #334155;
    font-size: 13px;
    color: #94a3b8;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid #1e2a45;
}

.modal-footer .btn-secondary,
.modal-footer .btn-primary {
    margin-top: 0;
    padding: 9px 18px;
    font-size: 13px;
}

.form-error {
    padding: 9px 12px;
    border-radius: 6px;
    font-size: 13px;
    color: #f87171;
    background-color: #1f1515;
    border: 1px solid #7f1d1d;
}

.form-error.hidden { display: none; }
.form-hint { font-size: 12px; color: #475569; margin-top: 3px; }

/* ===== TOAST ===== */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 11px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    max-width: 300px;
    border: 1px solid;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.toast.toast-visible { opacity: 1; }

.toast-success { background-color: #0f2a1a; color: #86efac; border-color: #166534; }
.toast-error { background-color: #1f1515; color: #f87171; border-color: #7f1d1d; }
.toast-info { background-color: #0f1f3d; color: #93c5fd; border-color: #1e3a8a; }

.toast-message { flex: 1; }

.toast-close {
    background: transparent;
    border: none;
    cursor: pointer;
    color: inherit;
    font-size: 14px;
    opacity: 0.6;
    font-family: inherit;
}

.toast-close:hover { opacity: 1; }

/* ===== DROPDOWN ===== */
.dropdown-menu {
    background: #1a2035;
    border: 1px solid #1e2a45;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    min-width: 180px;
    overflow: hidden;
    z-index: 1500;
}

.dropdown-header {
    padding: 10px 14px;
    border-bottom: 1px solid #1e2a45;
}

.dropdown-email { display: block; font-size: 12px; color: #3b82f6; font-weight: 600; }
.dropdown-name { display: block; font-size: 11px; color: #475569; margin-top: 2px; }

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 14px;
    background: transparent;
    border: none;
    color: #e4e4e7;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.2s;
    font-family: inherit;
}

.dropdown-item:hover { background-color: #1e2a45; }
.dropdown-item-danger { color: #f87171; }
.dropdown-item-danger:hover { background-color: #1f1515; }

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
    body.chat-mode main { padding: 10px 8px 8px; }

    .logo-image { width: 90px; height: 90px; }
    .logo-section { margin-bottom: 12px; }

    .chat-container {
        height: calc(100vh - 140px);
        border-radius: 12px;
    }

    #main-content { padding: 32px 20px; }
    .login-title { font-size: 22px; }
}

/* ===== PROFILE FORM STYLES ===== */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

.form-input-disabled {
    padding: 11px 14px;
    font-size: 15px;
    color: #94a3b8;
    background-color: #0a0f1f;
    border: 1px solid #334155;
    border-radius: 8px;
    cursor: not-allowed;
}

.required {
    color: #ef4444;
}

/* ===== BADGE STYLES ===== */
.badge-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 14px;
    background-color: #1e2a45;
    border: 1px solid #334155;
    border-radius: 8px;
    transition: all 0.2s;
}

.badge-container:focus-within {
    background-color: #1a2540;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.badges-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 24px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.badge span {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.badge-close {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
    font-size: 18px;
    padding: 0;
    width: 20px;
    height: 20px;
    line-height: 1;
    transition: all 0.2s;
    opacity: 0.8;
}

.badge-close:hover {
    opacity: 1;
    transform: scale(1.15);
}

.badge-close:active {
    transform: scale(0.95);
}

.badge-input {
    padding: 0;
    font-size: 15px;
    color: #e4e4e7;
    background-color: transparent;
    border: none;
    outline: none;
    font-family: inherit;
    flex: 1;
    min-width: 150px;
}

.badge-input::placeholder {
    color: #475569;
}

/* ===== CHECKBOX STYLES ===== */
.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.checkbox-input {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #334155;
    border-radius: 4px;
    background-color: transparent;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    position: relative;
}

.checkbox-input:hover {
    border-color: #475569;
    background-color: rgba(59, 130, 246, 0.05);
}

.checkbox-input:checked {
    background-color: #3b82f6;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.checkbox-input:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffffff;
    font-size: 12px;
    font-weight: bold;
    line-height: 1;
}

.checkbox-input:focus {
    outline: none;
    border-color: #3b82f6;
}

.checkbox-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #0a0f1f;
}

.checkbox-label {
    font-size: 14px;
    color: #e4e4e7;
    cursor: pointer;
    user-select: none;
    transition: color 0.2s;
}

.checkbox-item:hover .checkbox-label {
    color: #60a5fa;
}

.checkbox-input:disabled + .checkbox-label {
    opacity: 0.5;
    cursor: not-allowed;
}

.checkbox-other {
    margin-top: 0;
}

.other-input-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-left: 0;
    animation: slideDown 0.2s ease-out;
    grid-column: 1 / -1;
    margin-top: 8px;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.other-input-container .form-input {
    padding: 9px 12px;
    font-size: 13px;
}

/* ===== FIELD ERROR STYLES ===== */
.field-error {
    display: none;
    font-size: 13px;
    color: #f87171;
    margin-top: 6px;
    padding: 0 2px;
}
