:root {
    --primary-color: #3b82f6;
    --primary-gradient: linear-gradient(135deg, #3b82f6 0%, #2dd4bf 100%);
    --bg-color: #f1f5f9;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --border-radius: 12px;
    --transition: all 0.2s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

html {
    font-size: 14px; /* Scaled down base */
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
}

.dashboard {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: auto;
    gap: 1.5rem;
    padding: 2rem;
    max-width: 1600px;
    margin: 0 auto;
}

.card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 1.25rem;
    box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Specific Card Placements (Mosaic) */
.search-card {
    grid-column: span 12;
}

.form-card {
    grid-column: span 4;
}

.list-card {
    grid-column: span 8;
}

@media (max-width: 1024px) {
    .form-card, .list-card {
        grid-column: span 12;
    }
}

/* Card Header */
.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
}

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

label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.4rem;
    color: var(--text-secondary);
}

input, select, textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #f8fafc;
    color: var(--text-primary);
    font-size: 0.9375rem;
    transition: var(--transition);
}

input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
}

.btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.main-header {
    background: #000;
    border-radius: 24px;
    padding: 1rem 2rem;
    margin: 1rem auto;
    max-width: 1300px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.3s ease;
    color: white;
}

.main-header.header-hidden {
    transform: translateY(-200%);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.site-logo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: contain;
}

.logo-text h1 {
    font-size: 1.25rem;
    font-weight: 800;
    margin: 0;
    color: white;
    letter-spacing: -0.5px;
}

.logo-text p {
    font-size: 0.8rem;
    margin: 0;
    color: rgba(255, 255, 255, 0.7);
}

.header-nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.header-nav a {
    text-decoration: none;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
}

.header-nav a.active {
    color: var(--primary-color);
}

.btn-import {
    background: var(--primary-color);
    color: white !important;
    padding: 0.6rem 1.25rem;
    border-radius: 10px;
    transition: var(--transition);
}

.btn-import:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Table Styling */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 1rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

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

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: #f8fafc;
}

/* UI Elements */
.badge {
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

/* Grid helper */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.btn-delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #fee2e2;
    color: #dc2626;
    text-decoration: none;
    transition: var(--transition);
}

.btn-delete:hover {
    background: #fecaca;
    transform: scale(1.1);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.6);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 2.5rem;
    border-radius: 24px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: relative;
    border: 1px solid var(--border-color);
}

.close {
    color: var(--text-secondary);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #ef4444;
}

/* Badge Special Styles */
.badge-urgent {
    background: #fee2e2;
    color: #b91c1c;
}

.badge-normal {
    background: #e2e8f0;
    color: #475569;
}

.tab-btn {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.tab-btn.active {
    background: white;
    color: var(--primary-color);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

.tab-btn:hover:not(.active) {
    color: var(--text-primary);
}

@media (max-width: 1200px) {
    .stat-card {
        grid-column: span 6 !important;
    }
}

@media (max-width: 640px) {
    .stat-card {
        grid-column: span 12 !important;
    }
}

/* Print Styles */
@media print {
    body { background: white !important; padding: 0 !important; color: black !important; }
    .main-header, .form-card, .search-card, .btn, .no-print, .header-nav, .stat-card, footer, .form-group, .btn-primary, .header-content {
        display: none !important;
    }
    .dashboard { display: block !important; padding: 0 !important; margin: 0 !important; max-width: 100% !important; }
    .list-card { grid-column: span 12 !important; box-shadow: none !important; border: none !important; padding: 0 !important; width: 100% !important; display: block !important; }
    .card-title { font-size: 1.2rem !important; border-bottom: 2px solid #000; padding-bottom: 0.5rem; margin-bottom: 1rem !important; }
    table { width: 100% !important; border-collapse: collapse !important; border: 1px solid #777 !important; }
    th { background: #eee !important; color: black !important; font-weight: bold !important; font-size: 9pt !important; border: 1px solid #777 !important; }
    td { border: 1px solid #777 !important; padding: 5px !important; font-size: 9pt !important; color: black !important; }
    .badge { border: 1px solid #000 !important; color: black !important; background: none !important; padding: 0 !important; }
    tr { page-break-inside: avoid !important; }
}
/* Animated Cat Logo Styles */
.cat-logo-container {
    width: 100px;
    height: 100px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: visible;
}

.cat {
    position: relative;
    height: 65px;
    width: 73.45px; /* 65 * 1.13 */
    margin-top: 15px;
    overflow: visible;
}

.head-cat {
    position: absolute;
    height: 100%;
    width: 100%;
    background: #000;
    border-radius: 50%;
    z-index: 5;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1); /* Subtle outline to pop on black */
}

.ear-cat {
    position: absolute;
    top: -25%;
    height: 60%;
    width: 35%;
    background: white;
    z-index: 1;
}

.ear-left-cat {
    left: -2%;
    border-radius: 100% 10% 0% 0% / 110% 20% 0% 0%;
    transform: rotate(-15deg);
}

.ear-left-cat:before {
    content: '';
    position: absolute;
    height: 100%;
    width: 100%;
    background-color: white;
    text-align: left;
    border-top-right-radius: 5%;
    top: 22%;
    left: 55%;
    transform: rotate(-60deg) skewX(-30deg) scale(1, .866);
}

.ear-right-cat {
    right: -2%;
    border-radius: 10% 110% 0% 0% / 20% 110% 0% 0%;
    transform: rotate(15deg);
}

.ear-right-cat:before {
    content: '';
    position: absolute;
    height: 100%;
    width: 100%;
    background-color: white;
    text-align: left;
    border-top-right-radius: 5%;
    top: 22%;
    left: -32.5%;
    transform: rotate(-60deg) skewX(-30deg) scale(1, .866);
}

.eye-cat {
    position: absolute;
    top: 25%;
    height: 22%;
    width: 22%;
    background: white;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 30%;
    left: 0;
    overflow: hidden;
}

.eye-cat::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 0;
    width: 100%;
    border-radius: 0 0 50% 50% / 60% 60% 40% 30%;
    background: #000;
    -webkit-animation: blink-cat 4s infinite ease-in;
    animation: blink-cat 4s infinite ease-in;
    z-index: 5;
}

@-webkit-keyframes blink-cat {
    0% { height: 0; }
    87.5% { height: 0; }
    92.5% { height: 100%; }
    95% { height: 100%; }
    100% { height: 0; }
}
@keyframes blink-cat {
    0% { height: 0; }
    87.5% { height: 0; }
    92.5% { height: 100%; }
    95% { height: 100%; }
    100% { height: 0; }
}

.eye-left-cat {
    left: 20%;
}

.eye-right-cat {
    left: 58%;
    border-radius: 50% 50% 50% 50% / 60% 60% 30% 40%;
}

.eye-right-cat::after {
    border-radius: 0 0 50% 50% / 60% 60% 30% 40%;
}

.pupil-cat {
    position: absolute;
    top: 25%;
    left: 40%;
    height: 50%;
    width: 22%;
    background-color: black;
    border-radius: 47%;
    -webkit-animation: look-around-cat 4s infinite;
    animation: look-around-cat 4s infinite;
}

.pupil-cat::after {
    content: "";
    position: absolute;
    top: 20%;
    right: -4%;
    height: 20%;
    width: 35%;
    border-radius: 50%;
    background: white;
}

@-webkit-keyframes look-around-cat {
    0% { transform: translate(0) }
    15% { transform: translate(-30%, -15%) }
    35% { transform: translate(0, 0) }
    55% { transform: translate(30%, -15%) }
    75% { transform: translate(0, 0) }
}
@keyframes look-around-cat {
    0% { transform: translate(0) }
    15% { transform: translate(-30%, -15%) }
    35% { transform: translate(0, 0) }
    55% { transform: translate(30%, -15%) }
    75% { transform: translate(0, 0) }
}

.muzzle-cat {
    position: absolute;
    top: 45%;
    left: 50%;
    height: 5%;
    width: 8%;
    background: white;
    transform: translateX(-50%);
    border-radius: 50% 50% 50% 50% / 30% 30% 70% 70%;
}

/* ===== MOBİL RESPONSIVE HEADER ===== */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: .5rem;
    background: none;
    border: none;
    flex-shrink: 0;
}
.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: all .3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 768px) {
    .main-header {
        border-radius: 16px;
        padding: .75rem 1rem;
        margin: .5rem;
    }
    .header-content {
        flex-wrap: wrap;
        gap: .5rem;
    }
    .logo-area {
        flex: 1;
        min-width: 0;
    }
    .logo-text h1 {
        font-size: .85rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .logo-text p {
        font-size: .7rem;
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .main-header .cat-logo-container {
        transform: scale(0.75);
        transform-origin: left center;
        flex-shrink: 0;
    }
    .hamburger {
        display: flex;
    }
    .header-nav {
        display: none;
        flex-direction: column;
        width: 100%;
        gap: 0;
        background: #111;
        border-radius: 12px;
        overflow: hidden;
        margin-top: .25rem;
    }
    .header-nav.open {
        display: flex;
    }
    .header-nav a {
        padding: .85rem 1.25rem;
        border-bottom: 1px solid rgba(255,255,255,.06);
        font-size: .95rem;
    }
    .header-nav a:last-child {
        border-bottom: none;
    }
    .dashboard {
        padding: .5rem;
    }
    .search-card form {
        flex-direction: column !important;
        gap: .6rem !important;
    }
    .search-card form input[type=text],
    .search-card form select {
        width: 100% !important;
        box-sizing: border-box;
    }
    .search-card form .btn {
        width: 100% !important;
    }
    .search-card form > div {
        width: 100% !important;
        justify-content: stretch !important;
    }
    .search-card form > div .btn,
    .search-card form > div a.btn {
        flex: 1 !important;
    }
}

@media (max-width: 480px) {
    .logo-text h1 { font-size: .78rem; }
    .main-header { margin: .4rem; padding: .65rem .85rem; }
}
