/* =====================================================
   FONTS
===================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');


/* =====================================================
   DESIGN TOKENS
===================================================== */
:root {
    --primary: #3b82f6;
    --primary-600: #2563eb;
    --primary-50: #eff6ff;

    --bg: #f8fafc;
    --card-bg: #ffffff;

    --text-main: #0f172a;
    --text-muted: #64748b;

    --border: #e2e8f0;

    --success: #16a34a;
    --warning: #f59e0b;
    --danger: #dc2626;

    --radius: 12px;
}


/* =====================================================
   GLOBAL
===================================================== */

html {
    overflow-x: hidden;
    font-size: 95%;
}

body {
    background: var(--bg);
    color: var(--text-main);
    font-family: "Inter", sans-serif;
    font-weight: 400;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.2s ease;
}

a:hover {
    color: var(--primary);
}


/* =====================================================
   NAVBAR
===================================================== */

.navbar {
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    padding: 12px 20px;
}

.navbar-btn {
    border: none;
    background: none;
}


/* =====================================================
   LAYOUT WRAPPER
===================================================== */

.wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
}

#content {
    width: 100%;
    min-height: 100vh;
}
@media (min-width: 993px) {
    #content {
        padding: 20px;
    }
}


/* =====================================================
   SIDEBAR
===================================================== */

#sidebar {
    min-width: 220px;
    max-width: 220px;
    background: #ffffff;
    border-right: 1px solid var(--border);
    padding-top: 10px;
    transition: all 0.6s /*cubic-bezier(0.945, 0.020, 0.270, 0.665)*/;
    transform-origin: bottom left;
    z-index: 999;
}
#sidebar.active {
    margin-left: -220px;
    transform: rotateY(100deg);
}

/*#sidebar .sidebar-header {
    padding: 10px 20px;
}*/

#sidebar ul li a {
    display: block;
    padding: 10px 16px;
    margin: 4px 10px;
    border-radius: 8px;
    font-weight: 500;
    color: var(--text-muted);
}

#sidebar ul li a:hover {
    background: var(--primary-50);
    color: var(--primary);
}

#sidebar ul li.active > a {
    background: var(--primary-50);
    color: var(--primary);
}

#sidebarCollapse {
    width: 40px;
    height: 40px;
    background: none;
    cursor: pointer;
}

a[data-toggle="collapse"] {
    position: relative;
}

#sidebarCollapse span {
    width: 80%;
    height: 2px;
    margin: 0 auto;
    display: block;
    background: #555;
    transition: all 0.8s cubic-bezier(0.810, -0.330, 0.345, 1.375);
    transition-delay: 0.2s;
}

#sidebarCollapse span:first-of-type {
    transform: rotate(45deg) translate(2px, 2px);
}
#sidebarCollapse span:nth-of-type(2) {
    opacity: 0;
}
#sidebarCollapse span:last-of-type {
    transform: rotate(-45deg) translate(1px, -1px);
}


#sidebarCollapse.active span {
    transform: none;
    opacity: 1;
    margin: 5px auto;
}

    @media (max-width: 992px) {
        #sidebar {
            margin-left: -220px;
            transform: rotateY(90deg);
        }
        #sidebar.active {
            margin-left: 0;
            transform: none;
        }
        #sidebarCollapse span:first-of-type,
        #sidebarCollapse span:nth-of-type(2),
        #sidebarCollapse span:last-of-type {
            transform: none;
            opacity: 1;
            margin: 5px auto;
        }
        #sidebarCollapse.active span {
            margin: 0 auto;
        }
        #sidebarCollapse.active span:first-of-type {
            transform: rotate(45deg) translate(2px, 2px);
        }
        #sidebarCollapse.active span:nth-of-type(2) {
            opacity: 0;
        }
        #sidebarCollapse.active span:last-of-type {
            transform: rotate(-45deg) translate(1px, -1px);
        }
        .navbar {
            padding-top: 0 !important;
            padding-bottom: 0 !important;
        }
    }
    @media (min-width: 993px) {
        #sidebarCollapse {
            position: absolute;
            transition-duration: 400ms;
            transition-property: left;
            left: 220px;
            margin-left: 0.6rem;
        }
        #sidebarCollapse.active {
            transition-duration: 400ms;
            transition-property: left;
            left: 220px;
        }
    }

#settings-submenu li {
    padding-left: 5px;
}

/* =====================================================
   CARDS
===================================================== */

.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    margin-bottom: 1rem;
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1rem;
}

.card-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-main);
}

.card-body {
    padding: 1rem;
}


/* =====================================================
   TABLES
===================================================== */

table {
    width: 100%;
    font-size: 0.9rem;
    color: var(--text-main);
}

table thead th {
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    padding: 10px;
}

table tbody td {
    padding: 10px;
}

table tbody tr {
    border-bottom: 1px solid var(--border);
}

td {
    white-space: normal !important;
    word-wrap: break-word;
}


/* =====================================================
   BUTTONS
===================================================== */

.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 6px 14px;
}

.btn-primary {
    background: var(--primary);
    border: 1px solid var(--primary);
}

.btn-primary:hover {
    background: var(--primary-600);
    border-color: var(--primary-600);
}

.btn-secondary {
    background: #ffffff;
    border: 1px solid var(--border);
    color: var(--text-main);
}

.btn-success {
    background: var(--success);
    border: none;
}

.btn-warning {
    background: var(--warning);
    border: none;
}

.btn-danger {
    background: var(--danger);
    border: none;
}


/* =====================================================
   FORMS
===================================================== */

input,
select,
textarea {
    border-radius: 8px;
    border: 1px solid var(--border);
    padding: 6px 10px;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.15) !important;
    outline: none !important;
}


/* =====================================================
   STATUS BADGES
===================================================== */

.status-badge {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-success {
    background: #dcfce7;
    color: #166534;
}

.status-warning {
    background: #fef3c7;
    color: #92400e;
}

.status-danger {
    background: #fee2e2;
    color: #991b1b;
}


/* =====================================================
   FAB BUTTON
===================================================== */

.fab-wrapper {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1050;
}

.fab-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}

.fab-dropdown .btn {
    border-radius: 999px;
}


/* =====================================================
   LOADER
===================================================== */

#loader-container {
    position: fixed;
    height: 100vh;
    width: 100vw;
    background: rgba(248, 250, 252, 0.9);
    z-index: 2000;
}

#loader {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 60px;
    height: 60px;
    margin: -30px 0 0 -30px;
    border: 6px solid #dbeafe;
    border-top: 6px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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


/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 992px) {
    #sidebar {
        margin-left: -220px;
    }

    #sidebar.active {
        margin-left: 0;
    }
}


.form-control::placeholder {
    color: var(--text-muted);
    opacity: 1;
}

/* Muted look when no value selected */
.form-select {
    color: var(--text-main);
}

.form-select:invalid {
    color: var(--text-muted);
}

/* Ensure dropdown options are normal color */
.form-select option {
    color: var(--text-main);
}

.navbar-nav li.active * {
    color: var(--primary) !important;
    font-weight: bold;
}

.card-header {
    padding: 0.5rem 0.75rem;
}

.card-title {
    color: var(--primary) !important;
}

.dashboard-columns [class*="col-"], .row [class*="col-"] {
    padding-right: .5rem;
    padding-left: .5rem;
}

#notifications {
    min-width: 300px;
    max-height: 500px;
    overflow: auto;
}
#notifications a:hover {
    text-decoration: none;
}
.notification-date {
    font-size: 80%;
}

.fc-event {
    padding: 4px 8px !important;
    border-radius: 8px !important;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
}
.fc-event-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
}



/* Ügyfél profil */
.dashboard-columns {
    column-count: 1;
    column-gap: .5rem;
}
.dashboard-columns .col-12 {
    padding-left: 6px;
    padding-right: 6px;
}

.dashboard-columns .card {
    display: inline-block;
    width: 100%;
}

@media (min-width: 768px) {
    .dashboard-columns {
        column-count: 2;
    }
}
