/* =============================================
   NOSDDPP - Admin Panel Styles
   ============================================= */

/* Layout */
.admin-body {
    background: #f1f5f9;
    min-height: 100vh;
}

.admin-wrapper {
    display: flex;
    min-height: calc(100vh - 60px);
}

/* Header */
.admin-header {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.admin-logo-text {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
}

.admin-logo-badge {
    background: var(--color-red);
    color: #fff;
    font-size: 0.625rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
}

.admin-header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-user-name {
    color: #94a3b8;
    font-size: 0.875rem;
}

/* Sidebar */
.admin-sidebar {
    width: 250px;
    background: #fff;
    border-right: 1px solid #e2e8f0;
    padding: 1.5rem 0;
    flex-shrink: 0;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0 0.75rem;
}

.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #64748b;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: all 0.15s ease;
}

.admin-nav-item svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    flex-shrink: 0;
}

.admin-nav-item:hover {
    background: #f1f5f9;
    color: #334155;
}

.admin-nav-item.active {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: #fff;
}

.admin-nav-badge {
    margin-left: auto;
    background: #dc2626;
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.125rem 0.5rem;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

.admin-nav-item.active .admin-nav-badge {
    background: #fff;
    color: #dc2626;
}

/* Main Content */
.admin-main {
    flex: 1;
    padding: 1.5rem;
    overflow-x: hidden;
}

.admin-content {
    max-width: 1400px;
    margin: 0 auto;
}

/* Page Header */
.admin-page-header {
    margin-bottom: 1.5rem;
}

.admin-page-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.admin-page-header p {
    color: #64748b;
    margin: 0;
}

/* Stats Cards */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.admin-stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.admin-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.admin-stat-icon svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.admin-stat-icon.blue {
    background: #dbeafe;
    color: #2563eb;
}

.admin-stat-icon.yellow {
    background: #fef3c7;
    color: #d97706;
}

.admin-stat-icon.green {
    background: #dcfce7;
    color: #16a34a;
}

.admin-stat-icon.red {
    background: #fee2e2;
    color: #dc2626;
}

.admin-stat-info {
    display: flex;
    flex-direction: column;
}

.admin-stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.2;
}

.admin-stat-label {
    font-size: 0.8125rem;
    color: #64748b;
}

/* Cards */
.admin-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.admin-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    overflow: hidden;
}

.admin-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
}

.admin-card-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #334155;
    margin: 0;
}

.admin-link {
    font-size: 0.8125rem;
    color: #dc2626;
    text-decoration: none;
    font-weight: 500;
}

.admin-link:hover {
    text-decoration: underline;
}

.admin-card-body {
    padding: 1rem 1.25rem;
}

/* Lists */
.admin-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.admin-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 8px;
}

.admin-list-item-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.admin-list-item-title {
    font-weight: 500;
    color: #334155;
    font-size: 0.9375rem;
}

.admin-list-item-meta {
    font-size: 0.75rem;
    color: #94a3b8;
}

.admin-list-item-actions {
    display: flex;
    gap: 0.5rem;
}

.admin-empty {
    color: #94a3b8;
    font-size: 0.875rem;
    text-align: center;
    padding: 1rem;
}

/* Buttons */
.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

.btn-icon svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.btn-success {
    background: #16a34a;
    color: #fff;
    border: none;
}

.btn-success:hover {
    background: #15803d;
}

.btn-danger {
    background: #dc2626;
    color: #fff;
    border: none;
}

.btn-danger:hover {
    background: #b91c1c;
}

/* Tables */
.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #f1f5f9;
}

.admin-table th {
    background: #f8fafc;
    font-weight: 600;
    font-size: 0.8125rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.admin-table td {
    font-size: 0.9375rem;
    color: #334155;
}

.admin-table tr:hover td {
    background: #f8fafc;
}

/* Status Badges */
.admin-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
}

.admin-badge-success {
    background: #dcfce7;
    color: #16a34a;
}

.admin-badge-warning {
    background: #fef3c7;
    color: #d97706;
}

.admin-badge-danger {
    background: #fee2e2;
    color: #dc2626;
}

.admin-badge-info {
    background: #dbeafe;
    color: #2563eb;
}

.admin-badge-gray {
    background: #f1f5f9;
    color: #64748b;
}

/* Forms */
.admin-form-group {
    margin-bottom: 1rem;
}

.admin-form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #334155;
    margin-bottom: 0.375rem;
}

.admin-form-group input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.admin-form-group select,
.admin-form-group textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9375rem;
    color: #334155;
    background: #fff;
    transition: border-color 0.15s ease;
}

.admin-form-group input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):focus,
.admin-form-group select:focus,
.admin-form-group textarea:focus {
    outline: none;
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* Checkbox v admin formulářích */
.admin-form-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    padding: 0;
    cursor: pointer;
    accent-color: #dc2626;
    flex-shrink: 0;
    vertical-align: middle;
}

.admin-form-group label:has(input[type="checkbox"]) {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    margin-bottom: 0;
    font-weight: 400;
}

/* File input */
.admin-form-group input[type="file"] {
    width: 100%;
    padding: 0.5rem;
    font-size: 0.875rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    background: #fff;
}

.admin-form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

/* Modal */
.admin-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.admin-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.admin-modal {
    background: #fff;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(-20px);
    transition: transform 0.2s ease;
}

.admin-modal-overlay.active .admin-modal {
    transform: translateY(0);
}

.admin-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
}

.admin-modal-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.admin-modal-close {
    background: #f1f5f9;
    border: none;
    cursor: pointer;
    color: #64748b;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    font-size: 1.25rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.admin-modal-close:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.admin-modal-body {
    padding: 1.25rem;
}

.admin-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid #f1f5f9;
    background: #f8fafc;
}

.admin-modal-footer .btn {
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Tlačítka v admin hlavičce a tabulkách */
.admin-page-header .btn {
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
}

/* Login Page */
.admin-login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

.admin-login-box {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.admin-login-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.admin-login-header h1 {
    font-size: 1.5rem;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.admin-login-header p {
    color: #64748b;
    margin: 0;
}

.admin-login-error {
    background: #fee2e2;
    color: #dc2626;
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    display: none;
}

/* Responsive */
@media (max-width: 1200px) {
    .admin-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .admin-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .admin-sidebar {
        position: fixed;
        left: -250px;
        top: 60px;
        height: calc(100vh - 60px);
        z-index: 99;
        transition: left 0.3s ease;
    }
    
    .admin-sidebar.open {
        left: 0;
    }
    
    .admin-stats {
        grid-template-columns: 1fr;
    }
    
    .admin-form-row {
        grid-template-columns: 1fr;
    }
}
