/* ============================================
   GLOBAL STYLES
   ============================================ */
:root {
    /* Proškoly Brand Colors */
    --proskoly-pink: #DD007E;
    --proskoly-blue: #0080cf;
    --proskoly-pink-dark: #b8006a;
    --proskoly-blue-dark: #0066a6;
    
    /* Theme Colors */
    --primary-color: #0080cf;
    --primary-dark: #0066a6;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-bg: #f8f9fa;
    --dark-text: #212529;
    --border-radius: 12px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --box-shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
}

* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, var(--proskoly-blue) 0%, var(--proskoly-pink) 100%);
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

/* ============================================
   LOGIN PAGE STYLES
   ============================================ */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-wrapper {
    width: 100%;
    max-width: 450px;
}

.login-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-lg);
    overflow: hidden;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: center;
    padding: 40px 30px 30px;
    background: linear-gradient(135deg, var(--proskoly-blue) 0%, var(--proskoly-pink) 100%);
    color: white;
}

.login-logo {
    margin-bottom: 20px;
}

.login-logo .logo-image {
    max-width: 200px;
    height: auto;
    filter: brightness(0) invert(1); /* White logo on gradient background */
}

.login-logo i {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.login-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 10px 0;
}

.login-subtitle {
    font-size: 16px;
    margin: 0;
    opacity: 0.9;
}

.login-body {
    padding: 40px 30px;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    font-weight: 600;
    color: var(--dark-text);
    margin-bottom: 8px;
    display: block;
    font-size: 14px;
}

.login-form .form-control {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    padding: 12px 16px;
    transition: all 0.3s ease;
    font-size: 15px;
}

.login-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
    outline: none;
}

.login-form .btn-primary {
    background: linear-gradient(135deg, var(--proskoly-blue) 0%, var(--proskoly-pink) 100%);
    border: none;
    border-radius: 8px;
    padding: 14px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.login-form .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(221, 0, 126, 0.4);
}

.login-form .btn-primary:active {
    transform: translateY(0);
}

.login-footer {
    text-align: center;
    padding: 20px 30px 30px;
    background: var(--light-bg);
}

/* Alert messages */
.alert {
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    border: none;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

/* Form errors */
.error {
    color: var(--danger-color);
    font-size: 13px;
    margin-top: 5px;
    display: block;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 576px) {
    .login-card {
        border-radius: 0;
    }
    
    .login-header,
    .login-body,
    .login-footer {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .login-title {
        font-size: 24px;
    }
}

/* ============================================
   UTILITIES
   ============================================ */
.text-primary {
    color: var(--primary-color) !important;
}

.text-muted {
    color: #6c757d !important;
}

.small {
    font-size: 14px;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.w-100 {
    width: 100% !important;
}

/* ============================================
   CUSTOM BUTTON STYLES
   ============================================ */
.btn-outline-orange {
    --bs-btn-color: #ff9800;
    --bs-btn-border-color: #ff9800;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #ff9800;
    --bs-btn-hover-border-color: #ff9800;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #ff9800;
    --bs-btn-active-border-color: #ff9800;
    --bs-btn-disabled-color: #ff9800;
    --bs-btn-disabled-border-color: #ff9800;
}

.btn-outline-orange:hover {
    color: #fff;
    background-color: #ff9800;
    border-color: #ff9800;
}

.btn-outline-orange.active,
.btn-outline-orange:active {
    color: #fff !important;
    background-color: #ff9800 !important;
    border-color: #ff9800 !important;
}

.btn-outline-info {
    --bs-btn-color: #138294;
    --bs-btn-border-color: #138294;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #138294;
    --bs-btn-hover-border-color: #138294;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #138294;
    --bs-btn-active-border-color: #138294;
    --bs-btn-disabled-color: #138294;
    --bs-btn-disabled-border-color: #138294;
}

.btn-outline-info:hover {
    color: #fff;
    background-color: #138294;
    border-color: #138294;
}

.btn-outline-info.active,
.btn-outline-info:active {
    color: #fff !important;
    background-color: #138294 !important;
    border-color: #138294 !important;
}

/* ============================================
   TABLE SORTING STYLES
   ============================================ */
th a {
    cursor: pointer;
    user-select: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

th a:hover {
    color: #0080cf !important;
}

th a i.fa-sort {
    opacity: 0.3;
}

th a:hover i.fa-sort {
    opacity: 0.6;
}

th a i.fa-sort-up,
th a i.fa-sort-down {
    color: #0080cf;
}

/* ============================================
   COPY TO CLIPBOARD STYLES
   ============================================ */
.copy-to-clipboard {
    cursor: pointer;
    user-select: none;
    display: inline-block;
    padding: 2px 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.copy-to-clipboard:hover {
    background-color: #e3f2fd;
}

.copy-to-clipboard .copy-icon {
    font-size: 0.85em;
    opacity: 0.5;
    transition: all 0.2s ease;
}

.copy-to-clipboard:hover .copy-icon {
    opacity: 1;
}

.copy-icon-standalone {
    opacity: 0.5;
    transition: all 0.2s ease;
}

.copy-icon-standalone:hover {
    opacity: 1;
    color: #0080cf !important;
}

/* ============================================
   HEALTH SCORE STYLES
   ============================================ */

/* Health Score Circle */
.health-score-avg {
    background: linear-gradient(135deg, #adb5bd, #6c757d);
    color: white;
}
.health-score-circle {
    width: 120px;
    height: 120px;
    margin: 0 auto;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    position: relative;
}

.health-score-circle::before {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    padding: 5px;
    background: inherit;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0.3;
}

.health-score-value {
    font-size: 36px;
    font-weight: bold;
    line-height: 1;
    color: white;
}

.health-score-max {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

/* Risk Level Colors */
.health-score-critical {
    background: linear-gradient(135deg, #dc3545, #c82333);
}

.health-score-high {
    background: linear-gradient(135deg, #ff9800, #f57c00);
}

.health-score-medium {
    background: linear-gradient(135deg, #17a2b8, #138496);
}

.health-score-low {
    background: linear-gradient(135deg, #28a745, #218838);
}

/* Large Health Score Circle (for detail page) */
.health-score-circle-large {
    width: 180px;
    height: 180px;
    margin: 0 auto;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.health-score-value-large {
    font-size: 56px;
    font-weight: bold;
    line-height: 1;
    color: white;
}

.health-score-max-large {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
}

/* Risk Level Badges */
.badge-critical {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    font-size: 12px;
    padding: 6px 12px;
    font-weight: 600;
}

.badge-high {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: white;
    font-size: 12px;
    padding: 6px 12px;
    font-weight: 600;
}

.badge-medium {
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: white;
    font-size: 12px;
    padding: 6px 12px;
    font-weight: 600;
}

.badge-low {
    background: linear-gradient(135deg, #28a745, #218838);
    color: white;
    font-size: 12px;
    padding: 6px 12px;
    font-weight: 600;
}

.badge-large {
    font-size: 14px;
    padding: 8px 16px;
}

/* Stat Box */
.stat-box {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    height: 100%;
    border-left: 4px solid #0080cf;
    transition: all 0.3s ease;
}

.stat-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-label {
    font-size: 13px;
    color: #6c757d;
    margin-bottom: 8px;
    font-weight: 600;
}

.stat-value {
    font-size: 18px;
    font-weight: bold;
    color: #212529;
}

/* Health Breakdown */
.health-breakdown {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.health-component {
    margin-bottom: 15px;
}

.health-component:last-child {
    margin-bottom: 0;
}

/* Health Score Detail */
.health-score-detail {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Stat Row (for simple key-value pairs) */
.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.stat-row:last-child {
    border-bottom: none;
}

.stat-row span:first-child {
    color: #6c757d;
    font-size: 14px;
}

.stat-row span:last-child,
.stat-row strong {
    font-weight: 600;
    color: #212529;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .health-score-circle {
        width: 100px;
        height: 100px;
    }
    
    .health-score-value {
        font-size: 28px;
    }
    
    .health-score-circle-large {
        width: 140px;
        height: 140px;
    }
    
    .health-score-value-large {
        font-size: 42px;
    }
    
    .stat-box {
        margin-bottom: 15px;
    }
}

