@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800&display=swap');
@import url('../theme-admin/dist/css/bootstrap.min.css');
@import url('../theme-admin/dist/css/font-awesome.min.css');
@import url('../theme-admin/dist/css/simple-line-icons.css');
@import url('../theme-admin/dist/css/linea-icon.css');
@import url('../theme-admin/dist/css/animate.css');
@import url('../theme-admin/dist/css/style.css');

html[dir="rtl"] body,
html[dir="rtl"] .wrapper,
html[dir="rtl"] .page-wrapper,
html[dir="rtl"] .navbar,
html[dir="rtl"] .side-nav,
html[dir="rtl"] .panel,
html[dir="rtl"] table,
html[dir="rtl"] .form-control,
html[dir="rtl"] .dropdown-menu {
    direction: rtl;
}

body.omar-theme {
    font-family: 'Cairo', sans-serif;
    background: #eef3f7;
    color: #2d3a50;
}

.omar-theme a {
    text-decoration: none;
}

.preloader-it {
    display: none;
}

.theme-omar-shell .page-wrapper {
    background: #eef3f7;
    min-height: 100vh;
}

.omar-page-content {
    padding-top: 92px;
    padding-bottom: 24px;
}

.omar-topbar {
    background: linear-gradient(90deg, #1c2938, #23364d);
    border-bottom: 0;
    min-height: 64px;
    box-shadow: 0 10px 25px rgba(14, 20, 30, 0.12);
}

.omar-brand-link {
    display: flex;
    align-items: center;
    min-height: 64px;
}

.omar-brand-logo {
    width: 120px;
    max-height: 42px;
    object-fit: contain;
    margin-top: 10px;
}

.omar-topbar-title {
    color: #fff;
    padding-top: 10px;
}

.omar-topbar-title h1 {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.2;
}

.omar-topbar-title p {
    margin: 2px 0 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 12px;
}

.omar-top-actions > li > a {
    min-height: 64px;
    display: flex !important;
    align-items: center;
}

.omar-lang-label {
    font-size: 12px;
    font-weight: 700;
    margin-inline-start: 6px;
}

.omar-alert-dropdown {
    min-width: 320px;
    padding: 8px 0;
}

.omar-alert-title {
    font-weight: 800;
    padding: 12px 18px;
    color: #2d3a50;
}

.omar-alert-dropdown li a {
    display: block;
    padding: 10px 18px;
}

.omar-alert-dropdown li a strong,
.omar-alert-dropdown li a span,
.omar-alert-dropdown li a small {
    display: block;
}

.omar-alert-dropdown li a strong {
    color: #23364d;
    font-size: 13px;
    margin-bottom: 2px;
}

.omar-alert-dropdown li a small {
    color: #7d8da1;
    margin-top: 4px;
}

.omar-user-thumb {
    width: 34px;
    height: 34px;
    object-fit: cover;
    background: #fff;
}

.fixed-sidebar-left {
    background: linear-gradient(180deg, #1b2431, #23364d);
    box-shadow: 8px 0 28px rgba(10, 20, 30, 0.12);
}

.omar-side-nav {
    padding-top: 14px;
    background: transparent !important;
    border-right: 0 !important;
}

.omar-brand-block {
    padding: 18px 24px 20px !important;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 12px;
}

.omar-sidebar-logo {
    width: 138px;
    max-width: 100%;
    display: block;
    margin: 0 auto 12px;
}

.omar-sidebar-kicker {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #f2c97d;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.omar-brand-block small {
    display: block;
    color: rgba(255, 255, 255, 0.62);
    margin-top: 10px;
    font-size: 12px;
}

.omar-side-nav > li > a {
    color: rgba(255, 255, 255, 0.82) !important;
    font-weight: 700;
    border-radius: 12px;
    margin: 2px 12px;
    padding: 12px 16px !important;
    background: transparent !important;
}

.omar-side-nav > li.is-active > a,
.omar-side-nav > li > a:hover,
.omar-side-nav > li > a:focus {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
}

.omar-side-nav li a i {
    color: rgba(255, 255, 255, 0.7) !important;
}

.omar-side-nav > li.is-active > a i,
.omar-side-nav > li > a:hover i,
.omar-side-nav > li > a:focus i {
    color: #fff !important;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.card,
.panel {
    background: #fff;
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 10px 28px rgba(31, 45, 61, 0.08);
    border: none;
}

.card h3,
.panel h3 {
    margin-top: 0;
    font-size: 16px;
    font-weight: 800;
    color: #314259;
}

.metric {
    margin-top: 12px;
    font-size: 30px;
    font-weight: 800;
    color: #1b2431;
}

.panel-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

th,
td {
    padding: 14px;
    text-align: start;
    border-bottom: 1px solid #edf1f5;
    vertical-align: top;
}

th {
    color: #66788a;
    font-weight: 800;
    background: #f8fafc;
}

form.inline,
.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: end;
    margin-bottom: 18px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 180px;
    flex: 1 1 180px;
}

.form-control,
input,
select,
textarea {
    border-radius: 10px !important;
    min-height: 44px;
    border: 1px solid #dce6ef;
    box-shadow: none !important;
}

textarea {
    min-height: 110px;
    resize: vertical;
    padding-top: 12px !important;
}

button,
.btn {
    border-radius: 10px !important;
    font-weight: 700;
}

.btn-success,
.btn-primary-strong,
button,
.btn {
    background: linear-gradient(135deg, #2c8ef4, #4bc7ff);
    border-color: transparent;
    color: #fff;
}

.btn-secondary {
    background: linear-gradient(135deg, #f0ad4e, #f7c56f);
    color: #1b2431;
}

.flash {
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 16px;
}

.flash-success {
    background: #e7f8ef;
    color: #198754;
}

.flash-error {
    background: #fdeaea;
    color: #dc3545;
}

.omar-flash {
    box-shadow: 0 6px 18px rgba(31, 45, 61, 0.08);
}

.status-badge {
    display: inline-block;
    padding: 5px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.status-active,
.status-present {
    background: #e7f8ef;
    color: #198754;
}

.status-late {
    background: #fff3cd;
    color: #946200;
}

.status-absent,
.status-inactive {
    background: #fdeaea;
    color: #dc3545;
}

.status-leave {
    background: #ebf4ff;
    color: #0d6efd;
}

.hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 24px 28px;
    margin-bottom: 20px;
    border-radius: 20px;
    background: linear-gradient(135deg, #1f2f46, #2c4f72);
    color: #fff;
    box-shadow: 0 18px 40px rgba(18, 52, 59, 0.16);
}

.hero h2 {
    margin: 10px 0;
    font-size: 28px;
}

.hero p {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
}

.hero-kicker {
    display: inline-block;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    font-size: 12px;
    font-weight: 700;
}

.hero-clock {
    min-width: 170px;
    text-align: center;
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.12);
}

.hero-clock strong {
    display: block;
    font-size: 38px;
    line-height: 1;
}

.hero-clock span {
    color: rgba(255, 255, 255, 0.76);
}

.auth-form.omar-auth-form {
    width: 100%;
    max-width: 430px;
}

.omar-auth-body {
    background:
        radial-gradient(circle at top right, rgba(39, 121, 242, 0.2), transparent 24%),
        linear-gradient(180deg, #eef3f7, #f7fafc);
}

.omar-auth-logo {
    width: 130px;
    max-width: 100%;
    display: block;
    margin-bottom: 10px;
}

.omar-auth-subtitle {
    display: block;
    color: #7d8da1;
    margin-top: 6px;
}

.omar-auth-links p {
    margin-bottom: 8px;
}

.brand-logo,
.sidebar-logo,
.lang-switch,
.permission-grid,
.permission-item {
    display: none;
}

.actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.attendance-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.action-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 18px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid #edf1f5;
    box-shadow: 0 10px 28px rgba(31, 45, 61, 0.08);
}

.action-card p,
.muted {
    color: #7d8da1;
}

.check-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.check-row input {
    width: auto;
}

.employee-shell .content,
.content {
    padding: 0;
}

.layout {
    min-height: 100vh;
}

.employee-shell .layout .sidebar {
    position: fixed;
    top: 60px;
    left: 0;
    bottom: 0;
    width: 225px;
    margin-left: 0;
    z-index: 1060;
    overflow-y: auto;
    background: linear-gradient(180deg, #1b2431, #23364d);
    box-shadow: 8px 0 28px rgba(10, 20, 30, 0.12);
    transition: all 0.35s ease;
}

.employee-shell .layout .sidebar .brand {
    padding: 22px 18px 14px;
    color: #fff;
}

.employee-shell .layout .sidebar .brand h1,
.employee-shell .layout .sidebar .brand p {
    color: #fff;
}

.employee-shell .layout .sidebar .nav {
    display: block;
    padding: 8px 0 18px;
}

.employee-shell .layout .sidebar .nav a {
    display: block;
    color: rgba(255, 255, 255, 0.84) !important;
    background: transparent !important;
    padding: 12px 16px !important;
    margin: 2px 12px;
    border-radius: 12px;
    font-weight: 700;
}

.employee-shell .layout .sidebar .nav a.is-active,
.employee-shell .layout .sidebar .nav a:hover,
.employee-shell .layout .sidebar .nav a:focus {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
}

.employee-shell .layout .content {
    margin-left: 225px;
    min-height: 100vh;
}

.portal-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 16px;
}

.header-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.notify-menu {
    position: relative;
}

.notify-trigger {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #edf1f5;
    cursor: pointer;
    list-style: none;
    font-weight: 700;
    color: #314259;
}

.notify-menu summary::-webkit-details-marker {
    display: none;
}

.notify-count {
    display: inline-grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: #f44336;
    color: #fff;
    font-size: 11px;
}

.notify-panel {
    position: absolute;
    top: calc(100% + 10px);
    inset-inline-end: 0;
    width: min(360px, 88vw);
    background: #fff;
    border: 1px solid #edf1f5;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 14px 35px rgba(31, 45, 61, 0.12);
    z-index: 40;
}

.notify-item {
    padding: 10px 0;
    border-bottom: 1px solid #edf1f5;
}

.notify-item:last-child {
    border-bottom: 0;
}

.notify-item strong,
.notify-item span,
.notify-item p {
    display: block;
}

.notify-item span {
    color: #314259;
    font-weight: 700;
}

.notify-item p {
    margin: 4px 0 0;
    font-size: 13px;
    color: #7d8da1;
}

.notify-link {
    display: inline-flex;
    margin-top: 10px;
    font-weight: 700;
}

.lang-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #edf1f5;
}

.lang-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    padding: 8px 12px;
    border-radius: 10px;
    color: #637389;
    font-weight: 700;
}

.lang-chip.is-active {
    background: linear-gradient(135deg, #2c8ef4, #4bc7ff);
    color: #fff;
}

.omar-sidebar-overlay {
    display: none;
}

@media (max-width: 1199px) {
    .page-wrapper {
        margin-left: 0 !important;
        padding-left: 0 !important;
        left: 0 !important;
    }

    html[dir="rtl"] .page-wrapper {
        margin-right: 0 !important;
    }

    .fixed-sidebar-left {
        margin-left: -225px !important;
        transform: none !important;
        transition: transform 0.25s ease;
        z-index: 1060;
    }

    html[dir="rtl"] .fixed-sidebar-left {
        margin-left: -225px !important;
        transform: none !important;
    }

    body.omar-sidebar-open .fixed-sidebar-left {
        margin-left: 0 !important;
        transform: none !important;
    }

    body.omar-sidebar-open .page-wrapper,
    .theme-omar-shell.slide-nav-toggle .page-wrapper {
        left: 0 !important;
    }

    .omar-sidebar-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.3);
        z-index: 1050;
    }

    body.omar-sidebar-open .omar-sidebar-overlay {
        display: block;
    }

    .omar-page-content {
        padding-top: 86px;
    }

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

    .employee-shell .layout .sidebar {
        margin-left: -225px;
    }

    .employee-shell.omar-sidebar-open .layout .sidebar {
        margin-left: 0;
    }

    .employee-shell .layout .content {
        margin-left: 0;
    }
}

@media (max-width: 991px) {
    .cards {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }

    .hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .notify-panel {
        width: min(320px, 92vw);
    }
}

@media (max-width: 767px) {
    .omar-topbar-title h1 {
        font-size: 16px;
    }

    .omar-topbar-title p {
        font-size: 11px;
    }

    .card,
    .panel,
    .action-card {
        padding: 16px;
        border-radius: 16px;
    }

    .metric {
        font-size: 24px;
    }

    .toolbar,
    form.inline,
    .attendance-actions,
    .actions {
        gap: 10px;
    }

    .field {
        min-width: 100%;
    }

    .notify-trigger,
    .lang-toggle,
    .lang-chip,
    .btn,
    button,
    input,
    select,
    textarea {
        font-size: 16px;
    }

    .header-actions,
    .portal-header {
        flex-direction: column;
        align-items: stretch;
    }

    .notify-panel {
        position: static;
        width: 100%;
        margin-top: 10px;
    }

    th,
    td {
        padding: 10px;
        white-space: nowrap;
    }
}

@media (max-width: 575px) {
    .navbar-fixed-top .pull-left,
    .navbar-fixed-top .pull-right {
        float: none !important;
    }

    .omar-brand-link {
        min-height: auto;
    }

    .omar-topbar-title {
        padding-top: 0;
        margin-top: 6px;
    }

    .omar-top-actions {
        display: flex;
        align-items: center;
        justify-content: flex-end;
    }

    .omar-side-nav > li > a {
        margin: 2px 10px;
        padding: 11px 14px !important;
    }

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

    .hero {
        padding: 18px;
    }

    .hero h2 {
        font-size: 22px;
    }

    .hero-clock {
        min-width: 100%;
    }

    .hero-clock strong {
        font-size: 30px;
    }

    .omar-auth-form {
        padding: 0 8px;
    }

    .portal-header {
        margin-bottom: 12px;
    }
}
