:root {
    --brand-1: #0E2A5C;   /* digiwun lacivert */
    --brand-2: #00ADEE;   /* digiwun camgöbeği mavi */
    --brand-3: #6ECDF2;   /* açık mavi */
    --brand-dark: #061A3D;
    --paid: #16a34a;
    --pending: #f59e0b;
    --overdue: #dc2626;
}

body {
    background: #f4f6fb;
    font-family: 'Segoe UI', Tahoma, system-ui, -apple-system, Arial, sans-serif;
    color: #1f2937;
}

/* ====== Navbar ====== */
.app-navbar {
    background: linear-gradient(90deg, var(--brand-1) 0%, #143274 50%, var(--brand-2) 100%);
}
.app-navbar .navbar-brand,
.app-navbar .nav-link {
    color: #fff !important;
}
.app-navbar .nav-link:hover {
    color: var(--brand-3) !important;
}
.app-navbar .navbar-brand img {
    height: 36px;
    width: auto;
    background: rgba(255,255,255,.95);
    padding: 4px 10px;
    border-radius: 6px;
}
.app-navbar .nav-link.active,
.app-navbar .nav-link:focus { color: var(--brand-3) !important; }

/* ====== Login ====== */
.login-page {
    background:
        radial-gradient(circle at 15% 20%, rgba(0,173,238,.35) 0%, transparent 45%),
        radial-gradient(circle at 85% 80%, rgba(110,205,242,.35) 0%, transparent 45%),
        linear-gradient(135deg, var(--brand-dark) 0%, var(--brand-1) 50%, #143274 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.login-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(45deg, rgba(255,255,255,.03) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(255,255,255,.03) 25%, transparent 25%);
    background-size: 60px 60px;
    pointer-events: none;
}
.login-wrapper {
    width: 100%;
    max-width: 420px;
    padding: 1rem;
    position: relative;
    z-index: 1;
}
.login-card {
    background: #fff;
    padding: 2.5rem 2rem;
    border-radius: 1rem;
    box-shadow: 0 25px 60px rgba(0,0,0,.35);
}
.login-logo {
    display: block;
    max-width: 220px;
    height: auto;
    margin: 0 auto 1rem;
}
.logo-circle {
    width: 72px;
    height: 72px;
    line-height: 72px;
    margin: 0 auto;
    background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
    color: #fff;
    border-radius: 50%;
    font-size: 2rem;
    text-align: center;
}

/* ====== Stat Cards ====== */
.stat-card {
    background: #fff;
    border-radius: 0.85rem;
    padding: 1.1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .04);
    border-left: 4px solid #ddd;
    height: 100%;
}
.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    line-height: 48px;
    border-radius: 12px;
    text-align: center;
    color: #fff;
    font-size: 1.4rem;
    flex: 0 0 auto;
}
.stat-card .stat-label { color: #6b7280; font-size: .85rem; }
.stat-card .stat-value { font-size: 1.35rem; font-weight: 700; }
.stat-total   { border-left-color: var(--brand-2); }
.stat-total   .stat-icon { background: linear-gradient(135deg, var(--brand-1), var(--brand-2)); }
.stat-paid    { border-left-color: var(--paid); }
.stat-paid    .stat-icon { background: var(--paid); }
.stat-unpaid  { border-left-color: var(--pending); }
.stat-unpaid  .stat-icon { background: var(--pending); }
.stat-overdue { border-left-color: var(--overdue); }
.stat-overdue .stat-icon { background: var(--overdue); }

/* ====== FullCalendar event colors ====== */
.fc-event {
    cursor: pointer;
    border: none !important;
    padding: 0 !important;
    margin: 2px 4px !important;
    border-radius: 6px !important;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0,0,0,.08);
}
.fc-event .ev-inner {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    font-size: .82rem;
    line-height: 1.25;
    min-height: 26px;
}
.fc-event .ev-ico {
    flex: 0 0 auto;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: rgba(255,255,255,.25);
    color: #fff;
    font-weight: 700;
    text-align: center;
    line-height: 18px;
    font-size: .75rem;
}
.fc-event .ev-title {
    flex: 1 1 auto;
    color: #fff;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.fc-event .ev-amount {
    flex: 0 0 auto;
    color: #fff;
    font-weight: 700;
    font-size: .78rem;
    background: rgba(0,0,0,.18);
    padding: 1px 6px;
    border-radius: 10px;
}
.ev-paid    { background: #16a34a !important; }
.ev-pending { background: #f59e0b !important; }
.ev-overdue { background: #dc2626 !important; }
.ev-paid:hover, .ev-pending:hover, .ev-overdue:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0,0,0,.15);
    transition: all .15s ease;
}

/* List view styles */
.fc .fc-list-event-dot { display: none; }
.fc .fc-list-event-time { font-weight: 600; color: #4f46e5; width: 110px; }
.fc-list-event.ev-paid    td { background: #f0fdf4 !important; }
.fc-list-event.ev-pending td { background: #fffbeb !important; }
.fc-list-event.ev-overdue td { background: #fef2f2 !important; }

/* Calendar buttons */
.fc .fc-button-primary {
    background: var(--brand-1);
    border-color: var(--brand-1);
    text-transform: capitalize;
    font-weight: 500;
    box-shadow: none !important;
}
.fc .fc-button-primary:not(:disabled):hover,
.fc .fc-button-primary:not(:disabled).fc-button-active {
    background: var(--brand-2);
    border-color: var(--brand-2);
}
.fc .fc-toolbar-title { font-size: 1.4rem; font-weight: 700; color: #1f2937; }

/* Today highlight */
.fc .fc-day-today { background: #eef2ff !important; }
.fc .fc-daygrid-day-number { padding: 6px 8px !important; font-weight: 600; color: #4b5563; }
.fc .fc-day-today .fc-daygrid-day-number {
    background: var(--brand-1);
    color: #fff;
    border-radius: 50%;
    width: 28px; height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 4px;
    padding: 0 !important;
}
.fc .fc-col-header-cell-cushion {
    color: #6b7280;
    font-weight: 600;
    text-transform: uppercase;
    font-size: .78rem;
    padding: 8px 0;
}
.fc .fc-day-sat, .fc .fc-day-sun { background: #fafbfc; }
.fc .fc-daygrid-day-frame { min-height: 120px; }
.fc .fc-daygrid-day-events { margin-top: 2px !important; }
.fc .fc-daygrid-event-harness { margin-bottom: 2px; }
/* Tüm etkinliklerin sığması için günü dikey olarak büyüt */
.fc .fc-daygrid-day { vertical-align: top; }
.fc-daygrid-more-link { display: none !important; }

/* legend dots */
.legend-dot {
    display: inline-block;
    width: 12px; height: 12px;
    border-radius: 50%;
    margin-right: 4px;
    vertical-align: -2px;
}
.ev-paid-dot    { background: var(--paid); }
.ev-pending-dot { background: var(--pending); }
.ev-overdue-dot { background: var(--overdue); }

/* ====== Table row colors ====== */
.row-paid    { background-color: #f0fdf4 !important; }
.row-paid td { color: #15803d; }
.row-overdue { background-color: #fef2f2 !important; }
.row-overdue td { color: #991b1b; }
.row-upcoming { background-color: #fffbeb !important; }

/* ====== Cards ====== */
.card { border: none; border-radius: 0.85rem; }
.card-header { border-bottom: 1px solid #eef0f5; border-radius: 0.85rem 0.85rem 0 0 !important; }

/* Form floating label background fix */
.form-floating > label { color: #6b7280; }

/* ====== Brand color overrides for Bootstrap ====== */
.btn-primary {
    background: linear-gradient(135deg, var(--brand-1) 0%, var(--brand-2) 100%) !important;
    border: none !important;
    color: #fff !important;
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
    background: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand-1) 100%) !important;
    box-shadow: 0 4px 12px rgba(14,42,92,.3) !important;
}
.btn-outline-primary {
    color: var(--brand-1) !important;
    border-color: var(--brand-1) !important;
}
.btn-outline-primary:hover {
    background: var(--brand-1) !important;
    color: #fff !important;
}
.text-primary { color: var(--brand-1) !important; }
.bg-primary   { background: var(--brand-1) !important; }
a { color: var(--brand-1); }
a:hover { color: var(--brand-2); }
.form-check-input:checked {
    background-color: var(--brand-2) !important;
    border-color: var(--brand-2) !important;
}
.form-control:focus, .form-select:focus {
    border-color: var(--brand-2) !important;
    box-shadow: 0 0 0 .2rem rgba(0,173,238,.18) !important;
}

/* Side panel lists */
.side-list .list-group-item {
    padding: .65rem .85rem;
    border-left: 0;
    border-right: 0;
}
.side-list .list-group-item:first-child { border-top: 0; }
.side-list .list-group-item:hover { background: #f9fafb; }
.min-w-0 { min-width: 0; }
.text-truncate { max-width: 100%; }

/* Card border helpers */
.border-warning  { border-color: #f59e0b !important; }
.border-danger   { border-color: #dc2626 !important; }

/* Bigger calendar on large screens */
@media (min-width: 1200px) {
    .fc .fc-daygrid-day-frame { min-height: 130px; }
}
