/* ═══════════════════════════════════════════════════════════
   Tora IK Dashboard — Stylesheet
   ═══════════════════════════════════════════════════════════ */

:root {
    --primary: #1a56db;
    --primary-hover: #1648b8;
    --bg: #f0f2f5;
    --card-bg: #ffffff;
    --text: #1f2937;
    --text-light: #6b7280;
    --border: #e5e7eb;
    --error: #dc2626;
    --error-bg: #fef2f2;
    --success: #16a34a;
    --success-bg: #f0fdf4;
    --soon-bg: #fefce8;
    --soon-text: #a16207;
    --radius: 12px;
    --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1), 0 4px 10px rgba(0,0,0,0.06);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text);
    line-height: 1.6;
}

/* ── Auth Pages (Login, 2FA) ──────────────────────────── */
.auth-body {
    background: url('/static/img/background.png') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 40px;
    width: 100%;
    max-width: 420px;
    text-align: center;
}

.auth-card-wide {
    max-width: 480px;
}

.auth-logo {
    font-size: 28px;
    font-weight: 800;
    background: var(--primary);
    color: #fff;
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.auth-card h1 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
}

.auth-sub {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 24px;
}

.auth-error {
    background: var(--error-bg);
    color: var(--error);
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
    margin-bottom: 16px;
}

.form-group {
    text-align: left;
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text);
}

.form-group input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s;
    outline: none;
}

.form-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.1);
}

.password-wrapper {
    position: relative;
}

.pwd-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 12px;
    padding: 4px 8px;
    opacity: 0.6;
    color: var(--primary);
    font-weight: 600;
}

.pwd-toggle:hover { opacity: 0.8; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    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);
}

.btn-block {
    display: block;
    width: 100%;
    margin-top: 8px;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-outline:hover {
    background: var(--bg);
}

/* 2FA */
.qr-container {
    margin: 20px 0;
}

.qr-image {
    border: 3px solid var(--border);
    border-radius: 12px;
    padding: 8px;
    background: #fff;
}

.secret-box {
    background: var(--bg);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 20px;
}

.secret-label {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 6px;
}

.secret-code {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--primary);
    user-select: all;
}

.code-input {
    text-align: center;
    font-size: 24px !important;
    font-weight: 700;
    letter-spacing: 8px;
    padding: 14px !important;
}

.twofa-form {
    margin-top: 16px;
}

.auth-footer {
    margin-top: 20px;
}

.auth-link {
    color: var(--text-light);
    font-size: 13px;
    text-decoration: none;
}

.auth-link:hover {
    color: var(--primary);
}

/* ── Dashboard ────────────────────────────────────────── */
.dashboard-body {
    background: url('/static/img/background.png') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.dashboard-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-logo {
    font-size: 20px;
    font-weight: 800;
    background: var(--primary);
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-left h1 {
    font-size: 20px;
    font-weight: 700;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-name {
    font-size: 14px;
    color: var(--text-light);
}

.dashboard-main {
    flex: 1;
    padding: 48px 32px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.project-card {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 32px;
    cursor: pointer;
    transition: all 0.25s;
    border: 2px solid transparent;
    position: relative;
}

.project-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: var(--primary);
}

.card-disabled {
    opacity: 0.55;
    cursor: default;
}

.card-disabled:hover {
    box-shadow: var(--shadow);
    transform: none;
    border-color: transparent;
}

.card-icon {
    font-size: 16px;
    font-weight: 800;
    background: var(--primary);
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.card-desc {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 16px;
    line-height: 1.5;
}

.card-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-active {
    background: var(--success-bg);
    color: var(--success);
}

.badge-soon {
    background: var(--soon-bg);
    color: var(--soon-text);
}

.dashboard-footer {
    text-align: center;
    padding: 20px;
    color: #fff;
    font-size: 13px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

/* ── Widgets ─────────────────────────────────────────── */
.widgets-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.widget {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
}

.widget h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
}

.widget-content {
    font-size: 14px;
    color: var(--text-light);
    max-height: 200px;
    overflow-y: auto;
}

.widget-item {
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
}

.widget-item:last-child {
    border-bottom: none;
}

.widget-rehber {
    margin-bottom: 24px;
}

.rehber-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 12px;
    outline: none;
    background: rgba(255,255,255,0.8);
}

.rehber-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.1);
    background: #fff;
}

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

.rehber-table th,
.rehber-table td {
    text-align: left;
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
}

.rehber-table th {
    font-weight: 600;
    color: var(--text);
    background: rgba(0, 0, 0, 0.02);
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

.weather-info {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.weather-city {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

.weather-temp {
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
}

.weather-desc {
    font-size: 14px;
    color: var(--text-light);
}

.weather-now {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.weather-forecast {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.forecast-day {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
}

.forecast-name {
    min-width: 80px;
    font-weight: 600;
    color: var(--text);
}

.forecast-temps {
    min-width: 70px;
    color: var(--text);
}

.forecast-desc {
    color: var(--text-light);
}

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 600px) {
    .auth-card { padding: 28px 20px; }
    .dashboard-header { padding: 12px 16px; }
    .dashboard-main { padding: 24px 16px; }
    .cards-grid { grid-template-columns: 1fr; }
    .widgets-row { grid-template-columns: 1fr; }
}
