/**
 * Admin CSS - Rezervacni System v2
 * Doplnujici styly k Bootstrap 5
 */

/* ========================================
   CSS Variables (Custom Properties)
   ======================================== */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --sidebar-width: 250px;
    --sidebar-collapsed-width: 70px;
    --header-height: 60px;
    --transition-speed: 0.3s;
}

/* ========================================
   Base Styles
   ======================================== */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f8f9fa;
    min-height: 100vh;
}

/* ========================================
   Login Page
   ======================================== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, #0d1b2a 0%, #1b3a4b 40%, #254a5e 100%);
}

.login-box {
    width: 100%;
    max-width: 420px;
    padding: 2rem;
}

.login-card {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.login-card .card-header {
    background: none;
    border-bottom: none;
    padding: 0;
    text-align: center;
    overflow: hidden;
}

.login-card .card-body {
    padding: 2rem;
}

.login-card .card-footer {
    background: transparent;
    border-top: none;
    padding: 0 2rem 2rem;
    text-align: center;
}

.login-logo {
    margin: 0;
    line-height: 0;
}

.login-logo img {
    width: 100%;
    height: auto;
    display: block;
}

.login-title {
    font-size: 1rem;
    color: #6c757d;
    margin-bottom: 0;
    margin-top: 0;
    padding: 0.75rem 0 0;
}

.login-form .btn-primary {
    background: linear-gradient(135deg, #1b3a4b 0%, #254a5e 100%);
    border-color: #1b3a4b;
}

.login-form .btn-primary:hover {
    background: linear-gradient(135deg, #254a5e 0%, #2d5a6e 100%);
    border-color: #254a5e;
}

.login-form .form-control {
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    border: 1px solid #dee2e6;
}

.login-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

.login-form .btn-primary {
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    font-weight: 600;
}

.login-form .form-label {
    font-weight: 500;
    color: #495057;
}

/* ========================================
   Admin Layout
   ======================================== */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
    width: var(--sidebar-width);
    background: #212529;
    color: #fff;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1000;
    transition: width var(--transition-speed);
    overflow-x: hidden;
}

.admin-sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
}

.sidebar-nav {
    padding: 1rem 0;
}

.sidebar-nav .nav-link {
    color: rgba(255, 255, 255, 0.7);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    transition: all 0.2s;
    white-space: nowrap;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-nav .nav-link i {
    width: 24px;
    margin-right: 0.75rem;
    text-align: center;
}

.sidebar-nav .nav-section {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1rem 1rem 0.5rem;
    margin-top: 0.5rem;
}

/* Main Content */
.admin-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: margin-left var(--transition-speed);
}

.admin-sidebar.collapsed + .admin-main {
    margin-left: var(--sidebar-collapsed-width);
}

/* Header */
.admin-header {
    height: var(--header-height);
    background: #fff;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
}

.header-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #495057;
    cursor: pointer;
    padding: 0.5rem;
    margin-right: 1rem;
}

.sidebar-toggle:hover {
    color: var(--primary-color);
}

/* Content */
.admin-content {
    padding: 1.5rem;
}

.page-header {
    margin-bottom: 1.5rem;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.page-subtitle {
    color: #6c757d;
    margin-bottom: 0;
}

/* ========================================
   Cards & Widgets
   ======================================== */
.card {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid #eee;
    font-weight: 600;
}

.stat-card {
    padding: 1.5rem;
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-card .stat-label {
    color: #6c757d;
    font-size: 0.875rem;
}

/* ========================================
   Tables
   ======================================== */
.table-responsive {
    border-radius: 0.5rem;
    overflow: hidden;
}

.table thead th {
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

/* ========================================
   Forms
   ======================================== */
.form-label {
    font-weight: 500;
}

.form-control,
.form-select {
    border-radius: 0.375rem;
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    border-radius: 0.375rem;
    font-weight: 500;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ========================================
   Alerts
   ======================================== */
.alert {
    border: none;
    border-radius: 0.5rem;
}

/* ========================================
   User Dropdown
   ======================================== */
.user-dropdown .dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: #495057;
}

.user-dropdown .dropdown-toggle::after {
    display: none;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.user-name {
    font-weight: 500;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 991.98px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }

    .admin-sidebar.show {
        transform: translateX(0);
    }

    .admin-main {
        margin-left: 0;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }

    .admin-sidebar.show + .sidebar-overlay {
        display: block;
    }
}

@media (max-width: 575.98px) {
    .login-box {
        padding: 1rem;
    }

    .login-card .card-body {
        padding: 1.5rem;
    }
}

/* ========================================
   Utilities
   ======================================== */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cursor-pointer {
    cursor: pointer;
}

.hover-shadow:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
