/* Quotation Generator - Styles */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    --bg: #0a0a0f;
    --bg-card: #12121a;
    --bg-card-hover: #1a1a26;
    --bg-input: #16161f;
    --border: #2a2a3a;
    --border-focus: #6366f1;
    --text: #e4e4e7;
    --text-muted: #71717a;
    --text-dim: #52525b;
    --primary: #6366f1;
    --primary-hover: #818cf8;
    --primary-bg: rgba(99,102,241,0.1);
    --accent: #22d3ee;
    --success: #34d399;
    --success-bg: rgba(52,211,153,0.1);
    --danger: #f87171;
    --danger-bg: rgba(248,113,113,0.1);
    --warning: #fbbf24;
    --gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%);
    --shadow: 0 4px 24px rgba(0,0,0,0.4);
    --radius: 12px;
    --radius-sm: 8px;
    --font: 'DM Sans', sans-serif;
    --mono: 'JetBrains Mono', monospace;
}

* { margin:0; padding:0; box-sizing:border-box; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }

/* Layout */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.page-wrapper { min-height: 100vh; display: flex; flex-direction: column; }
.main-content { flex: 1; padding: 40px 0; }

/* Header */
.site-header {
    background: rgba(18,18,26,0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
    position: sticky; top: 0; z-index: 100;
}
.site-header .container { display: flex; justify-content: space-between; align-items: center; }
.site-logo {
    font-size: 1.25rem; font-weight: 700;
    background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.site-logo img { height: 36px; margin-right: 10px; vertical-align: middle; }
.site-nav a { color: var(--text-muted); margin-left: 24px; font-size: 0.9rem; font-weight: 500; transition: color 0.2s; }
.site-nav a:hover, .site-nav a.active { color: var(--text); }

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    margin-bottom: 20px;
    transition: border-color 0.2s;
}
.card:hover { border-color: rgba(99,102,241,0.3); }
.card-header { margin-bottom: 24px; }
.card-header h2 { font-size: 1.4rem; font-weight: 600; }
.card-header p { color: var(--text-muted); margin-top: 4px; font-size: 0.9rem; }

/* Stepper */
.stepper {
    display: flex; justify-content: center; gap: 8px;
    margin-bottom: 40px; padding: 0 20px;
}
.step {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: 0.85rem; font-weight: 500;
    color: var(--text-muted);
    transition: all 0.3s;
}
.step .num {
    width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: var(--bg-input);
    font-size: 0.8rem; font-weight: 600;
    font-family: var(--mono);
}
.step.active { border-color: var(--primary); color: var(--text); background: var(--primary-bg); }
.step.active .num { background: var(--primary); color: #fff; }
.step.done { border-color: var(--success); color: var(--success); }
.step.done .num { background: var(--success); color: var(--bg); }
.step-line { width: 40px; height: 2px; background: var(--border); align-self: center; }

/* Forms */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 18px; }
.form-group.full { grid-column: 1 / -1; }
.form-label {
    display: block; margin-bottom: 6px;
    font-size: 0.82rem; font-weight: 500;
    color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px;
}
.form-control {
    width: 100%; padding: 11px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font);
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}
.form-control:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}
.form-control::placeholder { color: var(--text-dim); }
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' viewBox='0 0 12 12'%3E%3Cpath fill='%2371717a' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center;
    padding-right: 32px;
}
.phone-group { display: flex; gap: 8px; }
.phone-group select { width: 110px; flex-shrink: 0; }
.phone-group input { flex: 1; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 24px;
    border: none; border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 0.9rem; font-weight: 600;
    cursor: pointer; transition: all 0.2s;
    text-decoration: none;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(99,102,241,0.4); color:#fff; }
.btn-success { background: var(--success); color: var(--bg); }
.btn-success:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(1.1); }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text-muted); }
.btn-outline:hover { border-color: var(--text-muted); color: var(--text); }
.btn-sm { padding: 7px 14px; font-size: 0.82rem; }
.btn-lg { padding: 14px 32px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-group { display: flex; gap: 10px; margin-top: 24px; }

/* Tools Selection */
.tools-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.tool-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
}
.tool-card.selected { border-color: var(--primary); background: var(--primary-bg); }
.tool-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.tool-card-header h3 { font-size: 1.1rem; font-weight: 600; }
.tool-card-header .check {
    width: 24px; height: 24px;
    border: 2px solid var(--border);
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}
.tool-card.selected .check { background: var(--primary); border-color: var(--primary); }
.tool-card.selected .check::after { content: '✓'; color: #fff; font-size: 14px; font-weight: 700; }
.tool-desc { color: var(--text-muted); font-size: 0.88rem; margin-bottom: 16px; }
.versions-row { display: flex; gap: 8px; flex-wrap: wrap; }
.version-btn {
    padding: 8px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-muted);
    font-family: var(--font);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex; flex-direction: column; align-items: center;
}
.version-btn:hover { border-color: var(--text-muted); }
.version-btn.active { border-color: var(--primary); color: var(--text); background: rgba(99,102,241,0.08); }
.version-btn .v-name { font-weight: 500; }
.version-btn .v-price { font-family: var(--mono); font-size: 0.82rem; color: var(--accent); margin-top: 2px; }
.version-btn .v-validity { font-size: 0.72rem; color: var(--text-dim); margin-top: 1px; }

/* Summary */
.summary-table { width: 100%; border-collapse: collapse; }
.summary-table th {
    text-align: left; padding: 10px 14px;
    font-size: 0.78rem; font-weight: 600;
    color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
}
.summary-table td { padding: 14px; border-bottom: 1px solid rgba(42,42,58,0.5); font-size: 0.95rem; }
.summary-table .price { font-family: var(--mono); color: var(--accent); }
.summary-total {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px; margin-top: 16px;
    background: var(--primary-bg);
    border: 1px solid rgba(99,102,241,0.2);
    border-radius: var(--radius-sm);
}
.summary-total .label { font-weight: 600; font-size: 1rem; }
.summary-total .amount { font-family: var(--mono); font-size: 1.4rem; font-weight: 700; color: var(--accent); }

/* Floating total */
.floating-total {
    position: fixed; bottom: 24px; right: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 24px;
    box-shadow: var(--shadow);
    z-index: 50;
    display: flex; align-items: center; gap: 16px;
}
.floating-total .ft-label { font-size: 0.85rem; color: var(--text-muted); }
.floating-total .ft-amount { font-family: var(--mono); font-size: 1.3rem; font-weight: 700; color: var(--accent); }

/* Admin */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
    width: 250px; background: var(--bg-card);
    border-right: 1px solid var(--border);
    padding: 24px 0; flex-shrink: 0;
    position: sticky; top: 0; height: 100vh;
    display: flex; flex-direction: column;
}
.admin-sidebar .logo { padding: 0 24px 24px; font-size: 1.1rem; font-weight: 700;
    background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    border-bottom: 1px solid var(--border);
}
.admin-sidebar nav { padding: 16px 0; flex: 1; }
.admin-sidebar nav a {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 24px; color: var(--text-muted);
    font-size: 0.9rem; font-weight: 500;
    transition: all 0.2s; border-left: 3px solid transparent;
}
.admin-sidebar nav a:hover { color: var(--text); background: rgba(255,255,255,0.02); }
.admin-sidebar nav a.active { color: var(--primary); border-left-color: var(--primary); background: var(--primary-bg); }
.admin-sidebar .logout { margin-top: auto; padding: 16px 24px; border-top: 1px solid var(--border); }
.admin-main { flex: 1; padding: 32px 40px; overflow-x: auto; }
.admin-main h1 { font-size: 1.5rem; font-weight: 700; margin-bottom: 8px; }
.admin-main .subtitle { color: var(--text-muted); margin-bottom: 28px; font-size: 0.9rem; }

/* Admin table */
.data-table { width: 100%; border-collapse: collapse; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.data-table th {
    text-align: left; padding: 12px 16px;
    background: rgba(255,255,255,0.02);
    font-size: 0.78rem; font-weight: 600;
    color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
}
.data-table td { padding: 12px 16px; border-bottom: 1px solid rgba(42,42,58,0.3); font-size: 0.9rem; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(255,255,255,0.01); }
.badge {
    display: inline-block; padding: 3px 10px;
    border-radius: 20px; font-size: 0.75rem; font-weight: 600;
}
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-primary { background: var(--primary-bg); color: var(--primary); }

/* Login */
.login-page {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: var(--bg);
}
.login-box {
    width: 400px; padding: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.login-box h1 { text-align: center; font-size: 1.4rem; margin-bottom: 8px; }
.login-box .sub { text-align: center; color: var(--text-muted); font-size: 0.9rem; margin-bottom: 28px; }

/* Alert */
.alert {
    padding: 12px 16px; border-radius: var(--radius-sm);
    margin-bottom: 20px; font-size: 0.9rem;
}
.alert-success { background: var(--success-bg); color: var(--success); border: 1px solid rgba(52,211,153,0.2); }
.alert-danger { background: var(--danger-bg); color: var(--danger); border: 1px solid rgba(248,113,113,0.2); }
.alert-info { background: var(--primary-bg); color: var(--primary); border: 1px solid rgba(99,102,241,0.2); }

/* Stats */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 28px; }
.stat-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 20px;
}
.stat-card .stat-label { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.stat-card .stat-value { font-size: 1.8rem; font-weight: 700; font-family: var(--mono); margin-top: 4px; }
.stat-card .stat-value.primary { color: var(--primary); }
.stat-card .stat-value.accent { color: var(--accent); }
.stat-card .stat-value.success { color: var(--success); }

/* Modal */
.modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
    z-index: 200; align-items: center; justify-content: center;
}
.modal-overlay.show { display: flex; }
.modal {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 32px;
    width: 500px; max-width: 90vw; max-height: 90vh; overflow-y: auto;
}
.modal h2 { font-size: 1.2rem; margin-bottom: 20px; }

/* Search/filter bar */
.filter-bar {
    display: flex; gap: 12px; margin-bottom: 20px; align-items: center; flex-wrap: wrap;
}
.filter-bar .form-control { max-width: 280px; }

/* Responsive */
@media (max-width: 768px) {
    .form-grid { grid-template-columns: 1fr; }
    .stepper { flex-direction: column; align-items: stretch; }
    .step-line { width: 2px; height: 16px; align-self: center; }
    .admin-layout { flex-direction: column; }
    .admin-sidebar { width: 100%; height: auto; position: static; flex-direction: row; flex-wrap: wrap; padding: 12px; }
    .admin-sidebar .logo { padding: 0 12px 0 0; border: none; }
    .admin-sidebar nav { display: flex; flex-wrap: wrap; padding: 0; }
    .admin-sidebar nav a { padding: 8px 12px; border-left: none; border-bottom: 2px solid transparent; font-size: 0.82rem; }
    .admin-sidebar nav a.active { border-bottom-color: var(--primary); }
    .admin-sidebar .logout { margin: 0; padding: 8px 12px; border: none; }
    .admin-main { padding: 20px; }
    .floating-total { bottom: 12px; right: 12px; left: 12px; justify-content: space-between; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .versions-row { flex-direction: column; }
}
