/* --- GLOBAL & FONTS --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #4f46e5;       /* Indigo */
    --primary-hover: #4338ca;
    --success: #10b981;       /* Emerald */
    --warning: #f59e0b;       /* Amber */
    --danger: #ef4444;        /* Red */
    --dark: #1f2937;          /* Gray 800 */
    --text: #4b5563;          /* Gray 600 */
    --bg: #f3f4f6;            /* Gray 100 */
    --white: #ffffff;
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* --- NAVIGATION --- */
nav.navbar {
    background: var(--white);
    box-shadow: var(--shadow);
    padding: 15px 0;
    margin-bottom: 40px;
}

nav .nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav .brand {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--primary);
    text-decoration: none;
}

nav .menu a {
    margin-left: 20px;
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}

nav .menu a:hover { color: var(--primary); }

/* --- CARDS & CONTAINERS --- */
.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 30px;
    margin-bottom: 30px;
}

/* --- BUTTONS --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.btn-primary, input[type="submit"] { background: var(--primary); color: white; }
.btn-primary:hover, input[type="submit"]:hover { background: var(--primary-hover); transform: translateY(-1px); }

.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #059669; }

.btn-danger { background: white; color: var(--danger); border: 1px solid var(--danger); }
.btn-danger:hover { background: #fef2f2; }

.btn-sm { padding: 6px 12px; font-size: 0.85rem; }

/* --- TABLES (ADMIN) --- */
.table-responsive {
    overflow-x: auto;
    border-radius: var(--radius);
}

table { width: 100%; border-collapse: collapse; white-space: nowrap; }
th { background: #f9fafb; text-align: left; padding: 16px; font-size: 0.75rem; text-transform: uppercase; color: #6b7280; font-weight: 700; letter-spacing: 0.05em; }
td { padding: 16px; border-top: 1px solid #e5e7eb; vertical-align: middle; }
tr:hover td { background: #f9fafb; }

/* --- STATUS BADGES --- */
.badge {
    padding: 4px 10px;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-new { background: #fef3c7; color: #b45309; }       /* Žlutá */
.badge-paid { background: #d1fae5; color: #065f46; }      /* Zelená */
.badge-shipped { background: #dbeafe; color: #1e40af; }   /* Modrá */
.badge-cancelled { background: #fee2e2; color: #991b1b; } /* Červená */

/* --- FORMS --- */
form { max-width: 100%; }
label { display: block; margin-bottom: 8px; font-weight: 600; color: var(--dark); font-size: 0.9rem; }
input, textarea, select { width: 100%; padding: 12px; border: 1px solid #d1d5db; border-radius: 8px; margin-bottom: 20px; font-family: inherit; transition: border 0.2s; box-sizing: border-box; }
input:focus, textarea:focus { outline: none; border-color: var(--primary); ring: 2px solid var(--primary); }

/* --- LOGIN PAGE --- */
.login-wrapper {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.login-box {
    width: 100%;
    max-width: 400px;
    text-align: center;
}

/* --- GRID FOR BOOKS --- */
.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 30px; }
.book-item { background: white; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transition: transform 0.2s; display: flex; flex-direction: column; }
.book-item:hover { transform: translateY(-5px); }
.book-image { height: 250px; background: #f3f4f6; display: flex; align-items: center; justify-content: center; padding: 20px; }
.book-image img { max-height: 100%; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
.book-details { padding: 20px; flex-grow: 1; display: flex; flex-direction: column; }