@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

/* ===== GLOBAL STYLES ===== */
/* MAIN THEME COLORS */
/*:root {
    --primary-1: #73020C;
    --primary-2: #A00012;
    --primary-gradient: linear-gradient(135deg, #73020C 0%, #D40018 100%);
}*/
:root {
    /* =========================
       PRIMARY COLORS
    ========================= */

    --primary-1: rgb(36,41,56);
    --primary-2: rgb(79,70,229);
    --primary-3: rgb(99,102,241);
    --primary-gradient: linear-gradient( 135deg, rgb(36,41,56) 0%, rgb(79,70,229) 100% );
    /* =========================
       BACKGROUND COLORS
    ========================= */

    --bg-main: rgb(248,250,252);
    --bg-section: rgb(241,245,249);
    --bg-card: rgb(255,255,255);
    --bg-hover: rgb(248,250,252);
    --bg-soft: rgb(239,246,255);
    /* =========================
       TEXT COLORS
    ========================= */

    --text-main: rgb(30,41,59);
    --text-light: rgb(100,116,139);
    --text-muted: rgb(148,163,184);
    --text-white: rgb(255,255,255);
    /* =========================
       BORDER COLORS
    ========================= */

    --border-color: rgb(226,232,240);
    --border-light: rgb(241,245,249);
    --border-focus: rgb(79,70,229);
    /* =========================
       SHADOWS
    ========================= */

    --shadow-sm: 0 2px 8px rgba(15,23,42,0.05);
    --shadow-md: 0 4px 20px rgba(15,23,42,0.08);
    --shadow-lg: 0 10px 30px rgba(15,23,42,0.12);
    /* =========================
       BUTTON COLORS
    ========================= */

    --btn-primary: rgb(79,70,229);
    --btn-primary-hover: rgb(67,56,202);
    --btn-dark: rgb(36,41,56);
    --btn-dark-hover: rgb(15,23,42);
    /* =========================
       STATUS COLORS
    ========================= */

    --success: rgb(34,197,94);
    --danger: rgb(239,68,68);
    --warning: rgb(245,158,11);
    --info: rgb(14,165,233);
    /* =========================
       PREMIUM ACCENT
    ========================= */

    --accent-gold: rgb(212,175,55);
}

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #f75e34;
}
.nav-item:hover,
.nav-subitem:hover {
    background: rgba(255, 255, 255, 0.20);
}

.nav-item.active,
.nav-subitem.active {
    background: rgba(255, 255, 255, 0.30);
    border-left-color: white;
}

.btn-primary {
    color: #fff;
    background-color: #0f0f0f;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus,
.form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}
.btn-logout,
.logout-btn {
    background: var(--primary-gradient);
    border: none;
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

/* ===== ERROR UI ===== */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
    background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhla...); /* truncated */
    background-repeat: no-repeat;
    background-position: 1rem;
    background-size: 1.8rem;
}

    .blazor-error-boundary::after {
        content: "An error has occurred.";
    }

/* ===== ANIMATIONS ===== */
@keyframes textGlow {
    0% {
        text-shadow: 0 0 5px #ff6ec4, 0 0 10px #7873f5;
    }

    100% {
        text-shadow: 0 0 20px #ff6ec4, 0 0 30px #7873f5;
    }
}

@keyframes companyGlow {
    0% {
        text-shadow: 0 0 5px #ff6ec4, 0 0 10px #7873f5;
    }

    100% {
        text-shadow: 0 0 15px #ff6ec4, 0 0 25px #7873f5;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-15px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ===== ATTENDANCE CALENDAR ===== */
.calendar-card, .summary-card {
    background: #fff;
    min-height: 520px;
}

.calendar-grid-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    margin-bottom: 6px;
}

.weekday {
    text-align: center;
    font-weight: 600;
    padding: 6px 0;
    border-bottom: 1px solid #e9ecef;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.calendar-cell {
    min-height: 95px;
    border-radius: 6px;
    padding: 8px;
    background: #f8f9fa;
    position: relative;
}

    .calendar-cell.muted {
        opacity: 0.45;
        background: transparent;
    }

.date-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.date-number {
    font-weight: 700;
}

.dots {
    height: 12px;
}

.dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
}

.dot-empty {
    background: #e9ecef;
}

.calendar-legend {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
}

.legend-dot {
    width: 12px;
    height: 12px;
    display: inline-block;
    border-radius: 50%;
}

    .legend-dot.present, .present {
        background: #28a745;
    }

    .legend-dot.absent, .absent {
        background: #dc3545;
    }

    .legend-dot.leave, .leave {
        background: #ff7f00;
    }

    .legend-dot.half, .half {
        background: #ffc107;
    }

    .legend-dot.nodata, .nodata {
        background: #6c757d;
    }

/* ===== RESPONSIVE BREAKPOINTS ===== */

/* -- 1200px -- */
@media (max-width: 1200px) {
    .app-sidebar {
        width: 260px;
    }

    .app-header, .app-footer {
        left: 260px;
    }
}

/* -- 1024px -- */
@media (max-width: 1024px) {
    .app-sidebar {
        width: 250px;
    }

    .app-header, .app-footer {
        left: 250px;
        padding: 0 24px;
    }

    .app-header {
        height: 65px;
    }

    .app-footer {
        height: 55px;
    }
}

/* -- 768px -- */
@media (max-width: 768px) {
    .app-sidebar {
        width: 220px;
        transform: translateX(-100%);
    }

    .app-header, .app-footer {
        left: 220px;
        padding: 0 20px;
    }

    .app-content {
        padding: 110px 16px 80px 16px;
    }

    .page-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .modern-table {
        font-size: 12px;
    }

        .modern-table th, .modern-table td {
            padding: 10px 8px;
        }
}

/* -- 576px -- */
@media (max-width: 576px) {
    .app-sidebar {
        width: 200px;
    }

    .app-header, .app-footer {
        left: 200px;
    }
}

/* -- 480px -- */
@media (max-width: 480px) {
    .app-sidebar {
        width: 180px;
    }

    .app-header, .app-footer {
        left: 180px;
    }
}

/*Dashboard*/

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .dashboard-container {
        padding: 8px;
    }

    .welcome-banner {
        flex-direction: column;
        text-align: center;
        padding: 10px;
    }

    .stats-container {
        grid-template-columns: 1fr;
    }

    .main-content-grid {
        grid-template-columns: 1fr;
    }

    .activity-item {
        flex-wrap: wrap;
    }

    .stat-number {
        font-size: 24px;
    }

    .machine-summary {
        grid-template-columns: 1fr;
    }
}


@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}





/*EmployeeeList*/
/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .employee-list-container {
        padding: 8px;
    }

    .page-header {
        flex-direction: column;
        text-align: center;
        padding: 10px;
    }

    .modern-table {
        font-size: 13px;
    }

        .modern-table th,
        .modern-table td {
            padding: 8px 6px;
            font-size: 13px;
        }
}




/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .dashboard-container {
        padding: 8px;
    }

    .welcome-banner {
        flex-direction: column;
        text-align: center;
        padding: 10px;
    }

    .stats-container {
        grid-template-columns: 1fr;
    }

    .main-content-grid {
        grid-template-columns: 1fr;
    }

    .modern-table {
        font-size: 13px;
    }

        .modern-table th, .modern-table td {
            padding: 10px 8px;
        }
}


@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
    }
}



/* RESPONSIVE */
@media (max-width: 576px) {
    .login-wrapper {
        padding: 10px !important;
    }

    .login-container {
        max-width: 340px; /* Reduced for mobile */
    }

    .login-form-section {
        padding: 20px 20px 15px !important;
    }

    .logo-section {
        padding: 20px 15px !important;
    }

    .company-name {
        font-size: 20px;
    }

    .form-header h2 {
        font-size: 18px;
    }

    .login-footer {
        padding: 10px 20px !important;
    }
}


@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}





/* Essl data */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .form-grid-modal {
        grid-template-columns: 1fr;
    }

    .filter-section {
        flex-direction: column;
    }

    .search-box {
        width: 100%;
        min-width: unset;
    }

    .filter-actions {
        width: 100%;
        flex-direction: column;
    }

    .filter-select,
    .btn-refresh {
        width: 100%;
    }

    .table-wrapper {
        overflow-x: scroll;
    }
}




@media (max-width: 900px) {
    .essl-stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
}

@media (max-width:700px) {
    .essl-page-header, .essl-header-content {
        flex-direction: column;
        gap: 9px;
        text-align: center;
    }

    .essl-stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .essl-table-card {
        font-size: 14px;
    }

    .essl-table-header {
        font-size: 15px;
    }

    .essl-modern-table th, .essl-modern-table td {
        padding: 7px 3px;
        font-size: 14px;
    }

    .essl-form-group, .essl-form-control {
        font-size: 14px;
    }
}




@keyframes essl-pop {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}




@media (max-width:900px) {
    .form-grid {
        grid-template-columns: 1fr 1fr;
    }

    .detail-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width:650px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .employee-management-container {
        padding: 7px;
    }

    .profile-section {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-header {
        padding: 10px;
    }
}



@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}


@media (max-width: 768px) {
    .employee-management-container {
        padding: 8px;
    }

    .page-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
        padding: 10px;
    }

    .header-actions {
        width: 100%;
        flex-direction: column;
    }

        .header-actions .btn-download, .header-actions .btn-add {
            width: 100%;
            justify-content: center;
        }

    .search-section {
        flex-direction: column;
    }

    .search-wrapper {
        width: 100%;
    }

    .modern-table {
        font-size: 14px;
    }

        .modern-table th, .modern-table td {
            padding: 8px 6px;
            font-size: 14px;
        }

    .action-buttons {
        flex-direction: column;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}


@media (max-width: 400px) {
    .logo-circle {
        width: 29px;
        height: 29px;
    }

    .company-logo {
        width: 24px;
        height: 24px;
    }

    .login-container {
        max-width: 99vw;
    }
}


/* MOBILE/RESPONSIVE */
@media (max-width: 576px) {
    .login-container {
        max-width: 98vw;
    }

    .login-card {
        border-radius: 11px;
    }

    .logo-section {
        padding: 8px 4px;
    }

    .logo-circle {
        width: 42px;
        height: 42px;
        padding: 2px;
        margin-bottom: 7px;
    }

    .company-name {
        font-size: 14px;
    }

    .company-tagline {
        font-size: 9.5px;
    }

    .login-form-section {
        padding: 8px 5vw 6px 5vw;
    }

    .login-footer {
        padding: 7px 4vw;
    }
}


@keyframes logoPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 8px 18px rgba(0,0,0,0.13);
    }

    50% {
        transform: scale(1.04);
        box-shadow: 0 13px 27px rgba(0,0,0,0.15);
    }
}



@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(32px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes particle-float {
    0%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }

    50% {
        transform: translateY(-80px);
        opacity: 0.7;
    }
}

@keyframes float {
    0%,100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}





@media (max-width: 768px) {
    .shift-management-container {
        padding: 8px;
    }

    .page-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
        padding: 10px;
    }

    .search-section {
        flex-direction: column;
    }

    .search-wrapper {
        width: 100%;
    }

    .modern-table {
        font-size: 14px;
    }

        .modern-table th,
        .modern-table td {
            padding: 8px 6px;
            font-size: 14px;
        }
}


@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}


@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .master-page-container {
        padding: 8px;
    }

    .tabs-navigation {
        justify-content: flex-start;
        overflow-x: auto;
    }

    .tab-btn {
        min-width: 80px;
        font-size: 13px;
    }

    .details-grid {
        grid-template-columns: 1fr;
    }

    .salary-grid {
        grid-template-columns: 1fr;
    }

    .data-table th,
    .data-table td {
        padding: 8px 10px;
        font-size: 14px;
    }
}



@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .employee-management-container {
        padding: 8px;
    }

    .page-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
        padding: 10px;
    }

    .search-section {
        flex-direction: column;
    }

    .search-wrapper {
        width: 100%;
    }

    .modern-table {
        font-size: 14px;
    }

        .modern-table th, .modern-table td {
            padding: 8px 6px;
            font-size: 14px;
        }

    .emp-avatar, .dept-avatar {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }
}


@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}


@media (max-width: 768px) {
    .dashboard-container {
        padding: 8px;
    }

    .page-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
        padding: 10px;
    }

    .search-section {
        flex-direction: column;
    }

    .search-wrapper {
        width: 100%;
    }

    .modern-table {
        font-size: 14px;
    }

        .modern-table th, .modern-table td {
            padding: 8px 6px;
            font-size: 14px;
        }

    .emp-avatar {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }
}