/* Medya Mimarı Destek Platformu - Minimalist Standardized Design System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

:root {
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --bg-subtle: #f1f5f9;
    --border-color: #e2e8f0;
    --border-darker: #cbd5e1;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --accent-primary: #2563eb;
    --accent-hover: #1d4ed8;
    --accent-green: #16a34a;
    --accent-amber: #d97706;
    --accent-rose: #dc2626;
    --sidebar-width: 240px;
    --radius: 6px;
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    -webkit-font-smoothing: antialiased;
}

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

/* Sol Sidebar Menü */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background: #ffffff;
    border-right: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.25rem;
    z-index: 1000;
}

.sidebar-brand-wrapper {
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-logo {
    max-height: 38px;
    width: auto;
    max-width: 100%;
    display: block;
}

.brand-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 0.35rem;
    letter-spacing: 0.02em;
}

.sidebar-nav {
    margin-top: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex-grow: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0.75rem;
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    transition: background-color 0.15s, color 0.15s;
}

.nav-item:hover {
    background: var(--bg-subtle);
    color: var(--text-primary);
}

.nav-item.active {
    background: #eff6ff;
    color: var(--accent-primary);
    font-weight: 600;
}

/* Profil Alanı & Dropdown */
.profile-area {
    position: relative;
    padding-top: 0.85rem;
    border-top: 1px solid var(--border-color);
}

.profile-btn {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    padding: 0.4rem;
    border-radius: var(--radius);
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s;
}

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

.avatar-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e0f2fe;
    color: #0369a1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.8rem;
    border: 1px solid #bae6fd;
}

.profile-dropdown {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 0;
    width: 100%;
    margin-bottom: 0.5rem;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
    z-index: 1100;
}

.profile-dropdown.show {
    display: block;
}

.dropdown-header {
    padding: 0.5rem 0.85rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.8rem;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.85rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: background 0.15s;
}

.dropdown-item:hover {
    background: var(--bg-subtle);
    color: var(--text-primary);
}

.dropdown-item.danger {
    color: var(--accent-rose);
}

/* Ana İçerik Alanı */
.main-wrapper {
    margin-left: var(--sidebar-width);
    flex-grow: 1;
    padding: 2rem 2.5rem;
    min-height: 100vh;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
}

/* Auth Page */
.auth-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100vw;
    min-height: 100vh;
    padding: 1.5rem;
    background: var(--bg-main);
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 2rem;
    width: 100%;
    max-width: 380px;
}

.auth-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-header img {
    max-height: 42px;
    width: auto;
    margin-bottom: 0.4rem;
}

.auth-header p {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Form Controls */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.3rem;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: #ffffff;
    border: 1px solid var(--border-darker);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.875rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-primary);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 0.85rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background-color 0.15s, border-color 0.15s;
}

.btn-primary {
    background: var(--accent-primary);
    color: #ffffff;
    border-color: var(--accent-primary);
}

.btn-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

.btn-secondary {
    background: #ffffff;
    color: var(--text-primary);
    border-color: var(--border-darker);
}

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

.btn-success {
    background: var(--accent-green);
    color: #ffffff;
    border-color: var(--accent-green);
}

.alert {
    padding: 0.6rem 0.8rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.alert-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: var(--accent-rose);
}

.alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: var(--accent-green);
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 0.85rem 1.15rem;
}

.stat-val {
    font-size: 1.5rem;
    font-weight: 600;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.775rem;
    font-weight: 500;
}

/* Toolbar & Tabs */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.tabs {
    display: flex;
    gap: 0.25rem;
    background: var(--bg-subtle);
    padding: 0.2rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.tab-item {
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    color: var(--text-secondary);
    font-size: 0.825rem;
    font-weight: 500;
}

.tab-item.active {
    background: #ffffff;
    color: var(--text-primary);
    font-weight: 600;
    border: 1px solid var(--border-color);
}

/* Table */
.table-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th {
    background: var(--bg-subtle);
    padding: 0.65rem 0.9rem;
    font-size: 0.775rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

td {
    padding: 0.75rem 0.9rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.85rem;
}

tr:hover td {
    background: #fafafa;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.18rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-open { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.badge-progress { background: #fffbeb; color: #b45309; border: 1px solid #fef3c7; }
.badge-planned { background: #faf5ff; color: #6b21a8; border: 1px solid #e9d5ff; }
.badge-done { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.badge-closed { background: #f8fafc; color: #64748b; border: 1px solid #e2e8f0; }

.priority-urgent { color: var(--accent-rose); font-weight: 600; }
.priority-high { color: var(--accent-amber); font-weight: 600; }
.priority-normal { color: var(--text-primary); }
.priority-low { color: var(--text-muted); }

/* Timeline & Replies */
.ticket-header {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.15rem 1.35rem;
    margin-bottom: 1.15rem;
}

.reply-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.15rem;
    margin-bottom: 1rem;
}

.reply-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.775rem;
    color: var(--text-muted);
}

.reply-internal {
    border-left: 3px solid var(--accent-amber);
    background: #fffbeb;
}

.attachments-list {
    margin-top: 0.75rem;
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.attachment-item {
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    padding: 0.25rem 0.55rem;
    border-radius: 4px;
    font-size: 0.775rem;
    color: var(--text-secondary);
}

.badge-planned { background: #f5f3ff; color: #6d28d9; border: 1px solid #ddd6fe; }

.copy-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
    margin-top: 0.75rem;
}
.copy-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
}
.copy-grid code {
    display: block;
    font-family: ui-monospace, monospace;
    font-size: 0.8rem;
    background: #fff;
    padding: 0.5rem 0.65rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.status-legend {
    list-style: none;
    display: grid;
    gap: 0.55rem;
}
.status-legend li {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.roadmap {
    display: grid;
    gap: 0.75rem;
}
.roadmap-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1rem 1.15rem;
}
.roadmap-item h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0.35rem 0 0.3rem;
}
.roadmap-item p {
    margin: 0;
    font-size: 0.82rem;
    color: var(--text-secondary);
}
.roadmap-meta {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}
.roadmap-pri {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

.systems-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

.pager {
    display: flex;
    gap: 0.35rem;
    padding: 0.75rem 0.9rem;
    border-top: 1px solid var(--border-color);
}

.pager-link {
    min-width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.pager-link.is-active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #fff;
}

.sidebar-toggle {
    display: none;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 1100;
    height: 36px;
    padding: 0 12px;
    border: 1px solid var(--border-color);
    background: #fff;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}

@media (max-width: 900px) {
    .systems-grid,
    .ticket-layout,
    .container > div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }
    .sidebar-toggle { display: inline-flex; align-items: center; }
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.2s ease;
    }
    .sidebar.is-open { transform: none; }
    .main-wrapper {
        margin-left: 0;
        padding-top: 56px;
    }
    body { display: block; }
}

