/**
 * HCKreditMeter Portal 2 - Main Styles
 * 
 * Moderní responsive design pro portál majitelů bytů
 * 
 * @package HCKreditMeter_Portal2
 * @version 2.0.0
 */

/* ============================================
   CSS Custom Properties (Design Tokens)
   ============================================ */
:root {
    /* Colors - Primary */
    --hcm-primary-500: #667eea;
    --hcm-primary-600: #5568d3;
    --hcm-primary-700: #4453bc;
    --hcm-secondary-500: #764ba2;
    
    /* Colors - Semantic */
    --hcm-success: #22c55e;
    --hcm-warning: #f59e0b;
    --hcm-error: #ef4444;
    --hcm-info: #3b82f6;
    
    /* Colors - Neutral */
    --hcm-gray-50: #f9fafb;
    --hcm-gray-100: #f3f4f6;
    --hcm-gray-200: #e5e7eb;
    --hcm-gray-300: #d1d5db;
    --hcm-gray-400: #9ca3af;
    --hcm-gray-500: #6b7280;
    --hcm-gray-600: #4b5563;
    --hcm-gray-700: #374151;
    --hcm-gray-800: #1f2937;
    --hcm-gray-900: #111827;
    
    /* Spacing */
    --hcm-space-xs: 0.25rem;
    --hcm-space-sm: 0.5rem;
    --hcm-space-md: 1rem;
    --hcm-space-lg: 1.5rem;
    --hcm-space-xl: 2rem;
    --hcm-space-2xl: 3rem;
    
    /* Typography */
    --hcm-font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --hcm-font-size-sm: 0.875rem;
    --hcm-font-size-base: 1rem;
    --hcm-font-size-lg: 1.125rem;
    --hcm-font-size-xl: 1.25rem;
    --hcm-font-size-2xl: 1.5rem;
    --hcm-font-size-3xl: 2rem;
    
    /* Border Radius */
    --hcm-radius-sm: 0.25rem;
    --hcm-radius-md: 0.5rem;
    --hcm-radius-lg: 0.75rem;
    --hcm-radius-xl: 1rem;
    
    /* Shadows */
    --hcm-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --hcm-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --hcm-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --hcm-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    /* Transitions */
    --hcm-transition-fast: 150ms ease-in-out;
    --hcm-transition-base: 250ms ease-in-out;
    --hcm-transition-slow: 350ms ease-in-out;
}

/* ============================================
   Reset & Base Styles
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--hcm-font-family);
    font-size: var(--hcm-font-size-base);
    line-height: 1.6;
    color: var(--hcm-gray-800);
    background: var(--hcm-gray-50);
}

/* ============================================
   Login Page Styles
   ============================================ */
.login-container {
    background: white;
    border-radius: var(--hcm-radius-xl);
    box-shadow: var(--hcm-shadow-xl);
    padding: var(--hcm-space-2xl);
    width: 100%;
    max-width: 420px;
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: var(--hcm-space-xl);
}

.logo {
    margin-bottom: var(--hcm-space-lg);
}

.logo svg {
    display: block;
    margin: 0 auto;
    opacity: 0.9;
}

.login-header h1 {
    color: var(--hcm-gray-900);
    font-size: var(--hcm-font-size-3xl);
    margin-bottom: var(--hcm-space-sm);
    font-weight: 700;
}

.login-header p {
    color: var(--hcm-gray-600);
    font-size: var(--hcm-font-size-base);
}

.login-form {
    margin-bottom: var(--hcm-space-lg);
}

.form-group {
    margin-bottom: var(--hcm-space-lg);
}

.form-group label {
    display: flex;
    align-items: center;
    gap: var(--hcm-space-sm);
    margin-bottom: var(--hcm-space-sm);
    color: var(--hcm-gray-700);
    font-weight: 500;
    font-size: var(--hcm-font-size-sm);
}

.form-group label svg {
    color: var(--hcm-gray-400);
}

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--hcm-gray-200);
    border-radius: var(--hcm-radius-md);
    font-size: var(--hcm-font-size-base);
    transition: all var(--hcm-transition-base);
    background: white;
}

.form-group input:focus {
    outline: none;
    border-color: var(--hcm-primary-500);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input::placeholder {
    color: var(--hcm-gray-400);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--hcm-space-sm);
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--hcm-radius-md);
    font-size: var(--hcm-font-size-base);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--hcm-transition-base);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--hcm-primary-500) 0%, var(--hcm-secondary-500) 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--hcm-shadow-lg);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-block {
    width: 100%;
}

.alert {
    display: flex;
    align-items: center;
    gap: var(--hcm-space-sm);
    padding: var(--hcm-space-md);
    border-radius: var(--hcm-radius-md);
    margin-bottom: var(--hcm-space-lg);
    font-size: var(--hcm-font-size-sm);
    animation: slideInDown 0.3s ease-out;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-error {
    background-color: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.alert-success {
    background-color: #efe;
    color: #3c3;
    border: 1px solid #cfc;
}

.alert svg {
    flex-shrink: 0;
}

.login-footer {
    text-align: center;
    color: var(--hcm-gray-600);
    font-size: var(--hcm-font-size-sm);
}

.login-footer p {
    margin-bottom: var(--hcm-space-sm);
}

.login-footer .version {
    color: var(--hcm-gray-400);
    font-size: 0.75rem;
}

/* ============================================
   Dashboard Layout
   ============================================ */
.dashboard-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.dashboard-header {
    background: linear-gradient(135deg, var(--hcm-primary-500) 0%, var(--hcm-secondary-500) 100%);
    color: white;
    padding: var(--hcm-space-lg) 0;
    box-shadow: var(--hcm-shadow-md);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--hcm-space-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: var(--hcm-space-lg);
}

.header-title h1 {
    font-size: var(--hcm-font-size-2xl);
    margin-bottom: var(--hcm-space-xs);
}

.header-title p {
    font-size: var(--hcm-font-size-sm);
    opacity: 0.9;
}

.header-right {
    display: flex;
    align-items: center;
    gap: var(--hcm-space-lg);
}

.user-info {
    display: flex;
    align-items: center;
    gap: var(--hcm-space-sm);
    padding: var(--hcm-space-sm) var(--hcm-space-md);
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--hcm-radius-md);
}

.btn-logout {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: var(--hcm-space-sm) var(--hcm-space-md);
}

.btn-logout:hover {
    background: rgba(255, 255, 255, 0.3);
}

.dashboard-main {
    flex: 1;
    padding: var(--hcm-space-xl) 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--hcm-space-lg);
}

/* ============================================
   Cards
   ============================================ */
.card {
    background: white;
    border-radius: var(--hcm-radius-lg);
    box-shadow: var(--hcm-shadow-sm);
    margin-bottom: var(--hcm-space-xl);
    overflow: hidden;
    transition: box-shadow var(--hcm-transition-base);
}

.card:hover {
    box-shadow: var(--hcm-shadow-md);
}

.card-header {
    padding: var(--hcm-space-lg);
    border-bottom: 1px solid var(--hcm-gray-200);
}

.card-header h2 {
    display: flex;
    align-items: center;
    gap: var(--hcm-space-sm);
    font-size: var(--hcm-font-size-xl);
    color: var(--hcm-gray-900);
    margin: 0;
}

.card-header svg {
    color: var(--hcm-primary-500);
}

.card-body {
    padding: var(--hcm-space-lg);
}

/* Property Card */
.card-property {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
}

.property-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--hcm-space-lg);
}

.property-item {
    display: flex;
    flex-direction: column;
    gap: var(--hcm-space-xs);
}

.property-label {
    font-size: var(--hcm-font-size-sm);
    color: var(--hcm-gray-600);
    font-weight: 500;
}

.property-value {
    font-size: var(--hcm-font-size-lg);
    color: var(--hcm-gray-900);
    font-weight: 600;
}

/* ============================================
   Statistics Cards
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--hcm-space-lg);
    margin-bottom: var(--hcm-space-xl);
}

.stat-card {
    background: white;
    border-radius: var(--hcm-radius-lg);
    padding: var(--hcm-space-lg);
    box-shadow: var(--hcm-shadow-sm);
    display: flex;
    align-items: center;
    gap: var(--hcm-space-lg);
    transition: all var(--hcm-transition-base);
}

.stat-card:hover {
    box-shadow: var(--hcm-shadow-md);
    transform: translateY(-2px);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--hcm-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon-meters {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.stat-icon-readings {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.stat-icon-date {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: var(--hcm-font-size-3xl);
    font-weight: 700;
    color: var(--hcm-gray-900);
    line-height: 1;
    margin-bottom: var(--hcm-space-xs);
}

.stat-label {
    font-size: var(--hcm-font-size-sm);
    color: var(--hcm-gray-600);
}

/* ============================================
   Latest Readings Cards
   ============================================ */
.latest-readings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--hcm-space-lg);
}

.reading-type-card {
    background: var(--hcm-gray-50);
    border-radius: var(--hcm-radius-md);
    padding: var(--hcm-space-lg);
    border: 2px solid var(--hcm-gray-200);
    transition: all var(--hcm-transition-base);
}

.reading-type-card:hover {
    border-color: var(--hcm-primary-500);
    box-shadow: var(--hcm-shadow-sm);
}

.reading-type-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--hcm-space-md);
}

.reading-type-header h3 {
    font-size: var(--hcm-font-size-lg);
    color: var(--hcm-gray-900);
    margin: 0;
}

.reading-date {
    font-size: var(--hcm-font-size-sm);
    color: var(--hcm-gray-500);
}

.reading-value {
    font-size: var(--hcm-font-size-3xl);
    font-weight: 700;
    color: var(--hcm-primary-600);
    margin-bottom: var(--hcm-space-sm);
}

.reading-unit {
    font-size: var(--hcm-font-size-lg);
    font-weight: 400;
    color: var(--hcm-gray-600);
}

.reading-consumption {
    font-size: var(--hcm-font-size-sm);
    color: var(--hcm-gray-600);
    margin-bottom: var(--hcm-space-xs);
}

.reading-meter {
    font-size: var(--hcm-font-size-sm);
    color: var(--hcm-gray-500);
    font-family: monospace;
}

/* ============================================
   Tables
   ============================================ */
.table-responsive {
    overflow-x: auto;
}

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

.table th,
.table td {
    padding: var(--hcm-space-md);
    text-align: left;
    border-bottom: 1px solid var(--hcm-gray-200);
}

.table th {
    background: var(--hcm-gray-50);
    font-weight: 600;
    color: var(--hcm-gray-700);
    font-size: var(--hcm-font-size-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table tbody tr {
    transition: background-color var(--hcm-transition-fast);
}

.table tbody tr:hover {
    background: var(--hcm-gray-50);
}

.table-striped tbody tr:nth-child(odd) {
    background: var(--hcm-gray-50);
}

.table-striped tbody tr:nth-child(odd):hover {
    background: var(--hcm-gray-100);
}

/* ============================================
   Badges
   ============================================ */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--hcm-radius-sm);
    font-size: var(--hcm-font-size-sm);
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

.badge-heating_HCA {
    background: #fee;
    color: #c33;
}

.badge-hot_water {
    background: #fef3e7;
    color: #d35400;
}

.badge-cold_water {
    background: #e8f4fd;
    color: #0366d6;
}

.badge-electricity {
    background: #fff4e6;
    color: #f59e0b;
}

.badge-gas {
    background: #f3e8ff;
    color: #9333ea;
}

.badge-outline {
    background: transparent;
    border: 1px solid var(--hcm-gray-300);
    color: var(--hcm-gray-600);
}

/* ============================================
   Empty State
   ============================================ */
.empty-state {
    text-align: center;
    padding: var(--hcm-space-2xl);
}

.empty-state svg {
    color: var(--hcm-gray-400);
    margin-bottom: var(--hcm-space-lg);
}

.empty-state h3 {
    font-size: var(--hcm-font-size-xl);
    color: var(--hcm-gray-700);
    margin-bottom: var(--hcm-space-sm);
}

.empty-state p {
    color: var(--hcm-gray-500);
}

/* ============================================
   Footer
   ============================================ */
.dashboard-footer {
    background: white;
    border-top: 1px solid var(--hcm-gray-200);
    padding: var(--hcm-space-lg) 0;
    margin-top: auto;
}

.dashboard-footer p {
    text-align: center;
    color: var(--hcm-gray-600);
    font-size: var(--hcm-font-size-sm);
    margin: 0;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: var(--hcm-space-md);
    }

    .header-left {
        flex-direction: column;
        text-align: center;
    }

    .header-right {
        flex-direction: column;
        width: 100%;
    }

    .user-info,
    .btn-logout {
        width: 100%;
        justify-content: center;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .property-grid {
        grid-template-columns: 1fr;
    }

    .latest-readings-grid {
        grid-template-columns: 1fr;
    }

    .table-responsive {
        margin: 0 calc(var(--hcm-space-lg) * -1);
    }

    .table {
        font-size: var(--hcm-font-size-sm);
    }

    .table th,
    .table td {
        padding: var(--hcm-space-sm);
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: var(--hcm-space-lg);
    }

    .login-header h1 {
        font-size: var(--hcm-font-size-2xl);
    }
}

/* ============================================
   Utility Classes
   ============================================ */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--hcm-space-sm); }
.mt-2 { margin-top: var(--hcm-space-md); }
.mt-3 { margin-top: var(--hcm-space-lg); }
.mt-4 { margin-top: var(--hcm-space-xl); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--hcm-space-sm); }
.mb-2 { margin-bottom: var(--hcm-space-md); }
.mb-3 { margin-bottom: var(--hcm-space-lg); }
.mb-4 { margin-bottom: var(--hcm-space-xl); }

.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

/* ============================================
   Portal Header & Layout (Shared)
   ============================================ */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    padding: 0;
    background: #f5f5f5;
}

.portal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.portal-header .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.portal-logo {
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.portal-user {
    display: flex;
    align-items: center;
    gap: 15px;
}

.portal-user-name {
    font-size: 14px;
    opacity: 0.9;
}

.portal-logout {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s;
}

.portal-logout:hover {
    background: rgba(255, 255, 255, 0.3);
    text-decoration: none;
    color: white;
}

.portal-main {
    padding: 30px 0;
}

.portal-section-title {
    font-size: 22px;
    font-weight: 600;
    color: #1d2327;
    margin: 40px 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e5e5;
}

/* ============================================
   Chart Components (Dashboard & Meter Detail)
   ============================================ */
.chart-container {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
    margin: 30px 0;
}

.chart-title {
    font-size: 20px;
    font-weight: 600;
    color: #1d2327;
    margin: 0 0 20px 0;
}

.chart-wrapper {
    position: relative;
    height: 400px;
}

/* ============================================
   Property Manager Card
   ============================================ */
.hcm-manager-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 20px 25px;
    margin: 20px 0;
    border-left: 4px solid #667eea;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.hcm-manager-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.hcm-manager-icon {
    font-size: 24px;
}

.hcm-manager-title {
    font-size: 16px;
    font-weight: 600;
    color: #495057;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hcm-managers-list {
    margin-left: 34px;
}

.hcm-manager-info {
    margin-bottom: 15px;
}

.hcm-manager-info:last-child {
    margin-bottom: 0;
}

.hcm-manager-name {
    font-size: 20px;
    font-weight: 700;
    color: #1d2327;
    margin-bottom: 8px;
}

.hcm-manager-email {
    font-size: 14px;
}

.hcm-manager-email a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.2s;
}

.hcm-manager-email a:hover {
    color: #5568d3;
    text-decoration: underline;
}

/* ============================================
   Meter Detail Page
   ============================================ */
.meter-detail-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
    margin: 20px 0;
}

.meter-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.meter-detail-title {
    display: flex;
    align-items: center;
    gap: 15px;
}

.meter-detail-icon {
    font-size: 48px;
}

.meter-detail-info h1 {
    font-size: 28px;
    margin: 0 0 5px 0;
    color: #1d2327;
}

.meter-detail-type {
    font-size: 16px;
    color: #646970;
    margin: 0;
}

.meter-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.meter-detail-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
}

.meter-detail-label {
    font-size: 12px;
    color: #646970;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.meter-detail-value {
    font-size: 18px;
    font-weight: 600;
    color: #1d2327;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 768px) {
    .portal-header .container {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .portal-user {
        flex-direction: column;
        gap: 10px;
    }
    
    .meter-detail-header {
        flex-direction: column;
    }
    
    .chart-wrapper {
        height: 300px;
    }
}

/* ============================================
   Pagination
   ============================================ */
.hcm-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.hcm-pagination-btn {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.hcm-pagination-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    color: white;
    text-decoration: none;
}

.hcm-pagination-info {
    font-size: 14px;
    color: #646970;
    font-weight: 600;
    padding: 0 10px;
}

@media (max-width: 480px) {
    .hcm-pagination {
        flex-direction: column;
        gap: 10px;
    }
    
    .hcm-pagination-btn {
        width: 100%;
        text-align: center;
    }
}

/* ============================================
   Date Filter Styles
   ============================================ */
.hcm-date-filter {
    margin: 30px 0;
}

.hcm-filter-form {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.hcm-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-end;
}

.hcm-filter-field {
    flex: 1;
    min-width: 200px;
}

.hcm-filter-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

.hcm-filter-field input[type="date"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    background: white;
    transition: all 0.2s ease;
}

.hcm-filter-field input[type="date"]:hover {
    border-color: #667eea;
}

.hcm-filter-field input[type="date"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.hcm-filter-actions {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.hcm-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    white-space: nowrap;
}

.hcm-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    height: 45px;
}

.hcm-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    color: white;
}

.hcm-btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.hcm-btn-secondary:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.hcm-filter-info {
    margin-top: 20px;
    padding: 15px 20px;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-left: 4px solid #3b82f6;
    border-radius: 8px;
    color: #1e40af;
    font-size: 14px;
    line-height: 1.6;
}

.hcm-filter-info strong {
    font-weight: 700;
    color: #1e3a8a;
}

/* Responsive pro filtry */
@media (max-width: 768px) {
    .hcm-filter-row {
        flex-direction: column;
    }
    
    .hcm-filter-field {
        width: 100%;
    }
    
    .hcm-filter-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .hcm-btn {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hcm-filter-form {
        padding: 20px 15px;
    }
}

/* ============================================
   Loading Spinner for AJAX
   ============================================ */
.hcm-loader {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.hcm-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f4f6;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: hcm-spin 1s linear infinite;
}

@keyframes hcm-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.hcm-loader p {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #667eea;
    text-align: center;
}

/* Alert notifications */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 14px;
    line-height: 1.6;
}

.alert-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-left: 4px solid #22c55e;
    color: #065f46;
}

.alert-error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-left: 4px solid #ef4444;
    color: #991b1b;
}

.alert-info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-left: 4px solid #3b82f6;
    color: #1e40af;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ============================================
   Additional Utility Classes
   ============================================ */

/* Footer for portal pages */
.portal-footer {
    text-align: center;
    padding: 30px 20px;
    color: #646970;
    font-size: 14px;
}

.portal-footer a {
    color: #2271b1;
    text-decoration: none;
}

.portal-footer a:hover {
    text-decoration: underline;
}

/* Alert with top margin */
.hcm-alert-spaced {
    margin-top: 40px;
}

/* Breadcrumb container */
.hcm-breadcrumb {
    margin-bottom: 20px;
}

/* Section heading for readings */
.hcm-section-heading {
    font-size: 22px;
    margin: 40px 0 20px 0;
}

/* Count badge in headings */
.hcm-count-badge {
    font-size: 14px;
    color: #646970;
    font-weight: normal;
}

/* ============================================
   Feature Toggles (Development)
   ============================================ */

/* Hide date filter (to be activated in production later) */
.hcm-date-filter {
    display: none !important;
}

