/* 
   UBB Programari - Design System
   Visual Identity: Universitatea Babeș-Bolyai
*/

:root {
    /* Dashboard Model Colors  */
    --dash-primary: #4e73df;
    --dash-primary-dark: #1c3684;
    --dash-secondary: #39035a;
    --dash-header-gradient: linear-gradient(90deg, #212529 0%, #4e73df 100%);

    --dash-bg: #f4f7f9;
    --dash-card-bg: #ffffff;
    --dash-shadow: 0 0.15rem 1.75rem 0 rgba(33, 40, 50, 0.15);

    --dash-text-main: #212832;
    --dash-text-muted: #69707a;

    /* Status & Priority Colors from Model */
    --dash-success: #1cc88a;
    /* Resolved/Open Success */
    --dash-danger: #e74a3b;
    /* Highest Priority */
    --dash-warning: #f6c23e;
    /* High Priority */
    --dash-info: #4e73df;
    /* Priority/General */
    --dash-blue: #4e73df;
    /* User/Employee line charts */
    --dash-gold: #f4b400;
    /* UBB accent compatibility */

    /* Legend colors for charts */
    --chart-line-red: #ff3b30;
    --chart-line-blue: #007bff;
    --chart-bar-blue: #4e73df;
    --chart-bar-orange: #f4b400;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--dash-bg);
    color: var(--dash-text-main);
    margin: 0;
    line-height: 1.5;
    font-size: 0.875rem;
    /* ~14px base */
}

/* Typography */
h1 {
    font-size: 1.75rem;
}

h2 {
    font-size: 1.5rem;
}

h3 {
    font-size: 1.25rem;
}

.ubb-font {
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    color: var(--dash-text-main);
}

.fs-smaller {
    font-size: smaller !important;
}

/* Navbar Dashboard Style */
.ubb-navbar {
    background: var(--dash-header-gradient);
    padding: 0.4rem 2rem;
    /* Slighly more compact */
    box-shadow: var(--dash-shadow);
    border: none;
    margin-bottom: 3rem;
}

.ubb-navbar .navbar-brand {
    color: #ffffff !important;
    font-weight: 700;
    font-size: 1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.ubb-navbar .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.ubb-navbar .nav-link:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.navbar-expand-lg .navbar-collapse {
    display: flex !important;
    flex-basis: auto;
    flex-grow: unset;
    justify-content: space-between;
}

@media (max-width: 566px) {
    .navbar-expand-lg .navbar-collapse {
        flex-basis: 100%;
        margin-bottom: 15px;
    }
}

/* Buttons */
.btn-ubb {
    background-color: var(--dash-primary);
    color: #ffffff;
    border: none;
    padding: 0.4rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.btn-ubb:hover {
    background-color: var(--dash-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.btn-ubb-secondary {
    background-color: var(--dash-secondary);
    color: #ffffff;
    border: none;
    padding: 0.4rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.btn-ubb-secondary:hover {
    background-color: var(--dash-secondary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Cards */
.ubb-card {
    background: var(--dash-card-bg);
    border: none;
    border-radius: 0.5rem;
    box-shadow: var(--dash-shadow);
    margin-bottom: 1.5rem;
    transition: none;
    /* Model image cards don't seem to hover-lift significantly */
}

.ubb-card-header {
    background-color: #ffffff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1rem 1.5rem;
    font-weight: 700;
    color: var(--dash-text-main);
    font-size: 0.95rem;
}

/* Dashboard Specific Badges/Tags */
.dash-badge {
    padding: 0.3em 0.5em;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 4px;
    text-transform: uppercase;
}

.dash-badge-highest {
    background-color: var(--dash-danger);
    color: white;
}

.dash-badge-high {
    background-color: var(--dash-warning);
    color: #333;
}

.dash-badge-open {
    background-color: var(--dash-info);
    color: white;
}

.dash-badge-resolved {
    background-color: var(--dash-success);
    color: white;
}

/* Login Page Specific */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    /*background: linear-gradient(135deg, #003366 0%, #001a33 100%);*/
    padding: 20px;
}

.login-box {
    width: 100%;
    max-width: 450px;
    background: var(--ubb-white);
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    text-align: center;
}

/*.login-box a,
.login-box small.text-muted {
    color: #FFFFFF !important;
}*/

.login-logo {
    width: 80px;
    margin-bottom: 20px;
}

/* Alerts */
.alert-ubb {
    border-radius: 8px;
    font-size: 0.9rem;
}

/* Table */
.ubb-table {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--ubb-shadow);
}

.ubb-table thead {
    background-color: var(--ubb-blue);
    color: var(--ubb-white);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .login-box {
        padding: 30px 20px;
    }
}

/* =========================================
   Standardized Module Styles 
   Merged from individual PHP views
========================================= */

/* Feature Cards (Thumbnails on Dashboard) */
.feature-card {
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.15) !important;
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
}

/* Control Settings / Reporting / Staff tools */
:root {
    --staff-primary: #1ca0b1;
    --staff-bg: #f4f7f6;
}

.dashboard-header {
    background: white;
    border-bottom: 1px solid #e0e6ed;
    padding: 1rem 0;
    margin-bottom: 1.5rem;
}

.filter-card {
    border-radius: 12px;
    border: none;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
}

.machine-card,
.time-card {
    border-radius: 12px;
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    height: 100%;
    transition: transform 0.2s;
}

.machine-card:hover {
    transform: translateY(-3px);
}

.slot-item {
    border-bottom: 1px solid #f0f2f5;
    padding: 0.75rem 0.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.slot-item:last-child {
    border-bottom: none;
}

.slot-item.is-current {
    background-color: #fff9e6;
    border-left: 4px solid #ffc107;
    border-radius: 4px;
}

.slot-student {
    flex: 1;
    min-width: 0;
}

.slot-data {
    width: 50px;
    font-weight: 600;
    color: #444;
}

.slot-actions {
    display: flex;
    gap: 5px;
}

.btn-action {
    padding: 0.35rem 0.75rem;
    font-size: 0.9rem;
    white-space: nowrap;
}

.btn-action.active-prezent {
    background-color: #198754 !important;
    color: white !important;
    border-color: #198754 !important;
}

.btn-action.active-absent {
    background-color: #dc3545 !important;
    color: white !important;
    border-color: #dc3545 !important;
}

/* View Toggle in Staff / Search */
.btn-check:checked+.btn-outline-primary {
    background-color: var(--staff-primary);
    border-color: var(--staff-primary);
}

.btn-outline-primary {
    color: var(--staff-primary);
    border-color: var(--staff-primary);
}

.search-box {
    position: relative;
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.search-box input {
    padding-left: 35px;
    border-radius: 10px;
}

.empty-state {
    padding: 4rem 2rem;
    color: #adb5bd;
}

/* Filter Bars & Modals for Reports */
.filter-bar {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    border: 1px solid #e9ecef;
}

.status-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-right: 10px;
    font-size: 0.85rem;
}

.chart-container {
    position: relative;
    height: 300px;
}

.table-status {
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 20px;
}

.pagination-info {
    font-size: 0.85rem;
    color: #6c757d;
}

.preset-btn {
    font-size: 0.75rem;
    padding: 2px 10px;
    gap: 1.5rem;
}

/* Sortable table headers */
.sortable {
    cursor: pointer;
    transition: background 0.2s;
    user-select: none;
}

.sortable:hover {
    background-color: #f1f4f9 !important;
}

.sortable.active {
    color: var(--staff-primary);
}

@media print {
    body {
        background: white !important;
    }

    body>*:not(#reportModal) {
        display: none !important;
    }

    #reportModal {
        display: block !important;
        position: static;
    }

    .modal-dialog {
        max-width: 100% !important;
        margin: 0 !important;
    }

    .modal-content {
        border: none !important;
        box-shadow: none !important;
    }

    .modal-header .btn-close,
    .modal-footer {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .filter-row>div {
        margin-bottom: 0.75rem;
    }
}