/* === VSupport Studio — Global Styles === */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* === Reset & Base === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #06060b;
    color: #d1d1d6;
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
input, select, textarea, button { font-family: inherit; }

/* === CSS Variables === */
:root {
    --bg-primary: #06060b;
    --bg-card: #0f0f18;
    --bg-card-hover: #14141f;
    --bg-input: #0a0a12;
    --border: #1e1e30;
    --border-hover: #2e2e48;
    --border-active: #6366f1;
    --text-primary: #e8e8ed;
    --text-secondary: #8b8b9e;
    --text-muted: #55556a;
    --accent: #6366f1;
    --accent-hover: #818cf8;
    --accent-glow: rgba(99, 102, 241, 0.15);
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.6);
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === Top Navigation === */
.top-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(6, 6, 11, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.1em;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}
.nav-brand .logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--accent), #a855f7);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
}
.nav-link {
    color: var(--text-secondary);
    font-size: 0.85em;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    cursor: pointer;
}
.nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}
.nav-link.active {
    color: var(--accent);
    background: var(--accent-glow);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius);
    transition: background var(--transition);
}
.nav-user:hover { background: rgba(255, 255, 255, 0.04); }
.nav-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--border);
    object-fit: cover;
}
.nav-user-name {
    font-size: 0.85em;
    color: var(--text-secondary);
    font-weight: 500;
}

.lang-switch {
    display: flex;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.lang-switch a {
    padding: 4px 10px;
    font-size: 0.75em;
    font-weight: 600;
    color: var(--text-muted);
    transition: all var(--transition);
    text-transform: uppercase;
}
.lang-switch a:hover { color: var(--text-secondary); }
.lang-switch a.active {
    background: var(--accent);
    color: #fff;
}

/* === Layout === */
.page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px;
}

/* === Cards === */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: all var(--transition);
}
.card:hover {
    border-color: var(--border-hover);
}
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}
.card-title {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text-primary);
}

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.875em;
    cursor: pointer;
    border: none;
    transition: all var(--transition);
    white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
    background: linear-gradient(135deg, var(--accent), #818cf8);
    color: #fff;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}
.btn-primary:hover { box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45); }

.btn-success {
    background: linear-gradient(135deg, var(--success), #16a34a);
    color: #fff;
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #dc2626);
    color: #fff;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
}
.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-glow);
    transform: none;
}

.btn-sm { padding: 6px 14px; font-size: 0.8em; border-radius: var(--radius-sm); }
.btn-icon { padding: 8px; width: 36px; height: 36px; }

/* === Forms === */
.form-group { margin-bottom: 18px; }
.form-label {
    display: block;
    font-size: 0.8em;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.form-control {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 0.95em;
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-control::placeholder { color: var(--text-muted); }

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%238b8b9e' viewBox='0 0 16 16'%3E%3Cpath d='m1 5 7 7 7-7z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 38px;
}

/* === Tables === */
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
table {
    width: 100%;
    border-collapse: collapse;
}
th {
    text-align: left;
    font-size: 0.75em;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}
td {
    padding: 14px 16px;
    font-size: 0.9em;
    border-bottom: 1px solid rgba(30, 30, 48, 0.5);
    vertical-align: middle;
}
tr:hover td { background: rgba(255, 255, 255, 0.015); }

/* === Badges === */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: 600;
    letter-spacing: 0.3px;
}
.badge-success { background: rgba(34, 197, 94, 0.1); color: var(--success); border: 1px solid rgba(34, 197, 94, 0.2); }
.badge-danger { background: rgba(239, 68, 68, 0.1); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.2); }
.badge-warning { background: rgba(245, 158, 11, 0.1); color: var(--warning); border: 1px solid rgba(245, 158, 11, 0.2); }
.badge-info { background: var(--accent-glow); color: var(--accent); border: 1px solid rgba(99, 102, 241, 0.2); }

/* === Copy button tooltip === */
.copy-tooltip {
    position: relative;
    cursor: pointer;
}
.copy-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 10px;
    background: var(--accent);
    color: #fff;
    font-size: 0.7em;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
}
.copy-tooltip.show::after { opacity: 1; }

/* === Modal === */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 200;
    align-items: center;
    justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 32px;
    width: 90%;
    max-width: 520px;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.25s ease;
}
@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-title {
    font-size: 1.2em;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
}
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
}

/* === Toasts / Alerts === */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius);
    font-size: 0.9em;
    margin-bottom: 16px;
    border: 1px solid;
}
.alert-success { background: rgba(34, 197, 94, 0.08); color: var(--success); border-color: rgba(34, 197, 94, 0.2); }
.alert-danger { background: rgba(239, 68, 68, 0.08); color: var(--danger); border-color: rgba(239, 68, 68, 0.2); }
.alert-warning { background: rgba(245, 158, 11, 0.08); color: var(--warning); border-color: rgba(245, 158, 11, 0.2); }

/* === Empty state === */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}
.empty-state .icon { font-size: 3em; margin-bottom: 14px; }
.empty-state p { font-size: 0.95em; }

/* === Login page === */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}
.login-page::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
    top: -200px;
    right: -200px;
    pointer-events: none;
}
.login-page::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.06) 0%, transparent 70%);
    bottom: -150px;
    left: -150px;
    pointer-events: none;
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 48px 40px;
    width: 90%;
    max-width: 420px;
    text-align: center;
    position: relative;
    z-index: 1;
    box-shadow: var(--shadow-lg);
}
.login-logo {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--accent), #a855f7);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8em;
    margin: 0 auto 24px;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.2);
}
.login-title {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}
.login-subtitle {
    color: var(--text-secondary);
    font-size: 0.9em;
    margin-bottom: 32px;
}

.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 14px 24px;
    background: #fff;
    color: #333;
    border: 1px solid #ddd;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.95em;
    cursor: pointer;
    transition: all var(--transition);
}
.btn-google:hover {
    background: #f8f8f8;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}
.btn-google svg { width: 20px; height: 20px; }

.login-note {
    margin-top: 24px;
    font-size: 0.8em;
    color: var(--text-muted);
}
.login-error {
    margin-bottom: 20px;
    padding: 12px 16px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius);
    color: var(--danger);
    font-size: 0.9em;
}

/* === Responsive === */
@media (max-width: 768px) {
    .top-nav { padding: 0 16px; }
    .nav-links { display: none; }
    .page-container { padding: 20px 16px; }
    .login-card { padding: 32px 24px; }
    table { font-size: 0.85em; }
    th, td { padding: 10px 12px; }
}
