/* frontend/assets/css/base.css */
/* Ortak stiller — tüm sayfalarda kullanılır */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    transition: background 0.3s, color 0.3s;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }

/* ─── Layout ─── */
.app-layout {
    display: flex;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    margin-left: 220px;
    padding: 0;
    min-height: 100vh;
}

/* ─── Header ─── */
.top-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
}

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

.header-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.header-date {
    font-size: 12px;
    color: var(--text-tertiary);
}

/* ─── Theme Dots ─── */
.theme-dots { display: flex; gap: 6px; }
.theme-dot {
    width: 16px; height: 16px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
}
.theme-dot:hover { transform: scale(1.2); }
.theme-dot.active { border-color: var(--text-primary); }
.theme-dot[data-theme="midnight"] { background: #7C6FE7; }
.theme-dot[data-theme="pastel"] { background: #B47AEA; }
.theme-dot[data-theme="ocean"] { background: #3B82F6; }
.theme-dot[data-theme="light"] { background: #6366F1; }

/* ─── Buttons ─── */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--bg-input); color: var(--text-secondary); border: 1px solid var(--border); }
.btn-danger { background: var(--red-alpha); color: var(--red); }
.btn-success { background: var(--green-alpha); color: var(--green); }
.btn-sm { padding: 5px 10px; font-size: 11px; }
.btn-icon { padding: 6px 8px; background: none; border: none; color: var(--text-tertiary); cursor: pointer; border-radius: 6px; }
.btn-icon:hover { background: var(--bg-hover); color: var(--text-primary); }

/* ─── Cards ─── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow);
}

/* ─── Forms ─── */
.form-group { margin-bottom: 14px; }
.form-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}
.form-input {
    width: 100%;
    padding: 9px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 13px;
    font-family: 'DM Sans', sans-serif;
    outline: none;
    transition: border-color 0.15s;
}
.form-input:focus { border-color: var(--primary); }
.form-input::placeholder { color: var(--text-muted); }

select.form-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%238B8AA0' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

/* ─── Modal ─── */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}
.modal-overlay.show { display: flex; }

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px;
    width: 480px;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    animation: modalIn 0.2s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.modal-title { font-size: 18px; font-weight: 700; }
.modal-close {
    background: none; border: none;
    color: var(--text-tertiary); font-size: 20px;
    cursor: pointer; padding: 4px 8px; border-radius: 6px;
}
.modal-close:hover { background: var(--bg-hover); }

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

/* ─── Usage Banners ─── */
#usageBanners { display: flex; flex-direction: column; gap: 0; }
.usage-banner {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 24px; font-size: 12px; font-weight: 500;
    animation: slideDown 0.3s ease;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}
.usage-banner.warning { background: var(--yellow-alpha); border-bottom: 1px solid rgba(251,181,36,0.15); color: var(--yellow); }
.usage-banner.limit { background: var(--red-alpha); border-bottom: 1px solid rgba(248,113,113,0.15); color: var(--red); }
.banner-icon { font-size: 14px; }
.banner-text { flex: 1; }
.banner-cta { color: var(--primary); text-decoration: none; font-weight: 700; font-size: 11px; white-space: nowrap; }
.banner-close { background: none; border: none; color: var(--text-tertiary); cursor: pointer; font-size: 14px; padding: 2px 6px; }

/* ─── Toast / Notifications ─── */
.toast-container { position: fixed; top: 16px; right: 16px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast {
    padding: 10px 16px; border-radius: 8px; font-size: 13px; font-weight: 500;
    animation: toastIn 0.3s ease; min-width: 280px; display: flex; align-items: center; gap: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
@keyframes toastIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
.toast.success { background: var(--green); color: #fff; }
.toast.error { background: var(--red); color: #fff; }
.toast.warning { background: var(--yellow); color: #1a1a2e; }

/* ─── Badge ─── */
.badge {
    padding: 2px 8px; border-radius: 4px; font-size: 10px;
    font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
}
.badge-green { background: var(--green-alpha); color: var(--green); }
.badge-red { background: var(--red-alpha); color: var(--red); }
.badge-yellow { background: var(--yellow-alpha); color: var(--yellow); }
.badge-blue { background: var(--blue-alpha); color: var(--blue); }

/* ─── Table ─── */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
    font-size: 10px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.5px; color: var(--text-tertiary);
    padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border);
}
.data-table td {
    padding: 10px 12px; font-size: 13px; border-bottom: 1px solid var(--border);
}
.data-table tr:hover td { background: var(--bg-hover); }

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .main-content { margin-left: 0; }
    .top-header { padding: 10px 14px; }
}
