/* [ MOBILE - Extra Small ] */
@media (max-width: 575.98px) {
    .list-group-horizontal {
        flex-direction: column;
    }

    .list-group-horizontal .list-group-item.title {
        font-weight: 500;
        padding-bottom: 0;
    }

    .list-group-horizontal .list-group-item.separat {
        display: none;
    }

    .list-group-horizontal .list-group-item.content {
        padding-top: 0;
        padding-left: 40px;
    }

    .list-group-horizontal .list-group-itemt {
        margin: 0;
        padding: 0;
    }

    .step-icon {
        height: 80px !important;
    }

    .step-icon .item-icon {
        width: 60px !important;
        height: 60px !important;
    }

    .step-icon~.lead {
        font-size: 16px !important;
    }

    /* Enhanced mobile buttons */
    .btn {
        padding: 10px 18px;
        font-size: 14px;
    }

    .tap {
        padding: 10px 18px;
        font-size: 13px;
    }

    /* Card adjustments */
    .card-thumbnail {
        padding: 16px;
        border-radius: var(--radius-lg);
    }

    /* Dashboard cards */
    .dashboard .icon {
        width: 50px;
        height: 50px;
        margin-right: 12px;
    }

    .dashboard .content .amout {
        font-size: 16px;
    }

    .dashboard .content .sub {
        font-size: 12px;
    }

    /* Modal mobile */
    .modal-custom .modal-content {
        padding: 15px 18px;
        margin: 10px;
        border-radius: var(--radius-lg);
    }

    /* Table mobile */
    .table-responsive {
        border-radius: var(--radius-md);
    }

    /* Badge mobile */
    .badge {
        padding: 6px 10px;
        font-size: 0.7rem;
    }

    /* Form controls mobile */
    .form-control,
    .form-select {
        padding: 10px 14px;
        font-size: 14px;
    }

    /* Heading mobile */
    .heading-1 {
        font-size: 22px;
    }
}

/* [ MOBILE - Small ] */
@media (max-width: 767.98px) {
    .content-wrapper {
        width: 100vw;
        padding: 15px;
        border-radius: var(--radius-xl);
        border-width: 6px;
    }

    .login .row .login-form .logo .img-logo {
        width: 8.125rem;
    }

    /* Cards stack nicely */
    .card {
        margin-bottom: 16px;
    }

    /* Better spacing */
    .mb-4 {
        margin-bottom: 1rem !important;
    }

    /* Table adjustments */
    .rdt_TableCol div,
    .rdt_TableCell div {
        padding: 8px 0;
        font-size: 13px;
    }

    /* Button full width on mobile */
    .btn-mobile-full {
        width: 100%;
    }
}

/* [ TABLET ] */
@media (max-width: 991.98px) {
    .login .row .login-form {
        background: linear-gradient(rgba(255, 255, 255, 0.96), rgb(255, 255, 255)), url(../ayam-telur.png);
        background-size: 120%;
        background-repeat: no-repeat;
    }

    .login .row .login-form form {
        padding: 0% 10%;
    }

    .menu-header {
        display: block;
    }

    .left-sidebar {
        width: 0%;
        border-radius: 0 var(--radius-xl) var(--radius-xl) 0;
    }

    #main-wrapper[data-layout="vertical"][data-sidebartype="full"] .left-sidebar {
        width: 100%;
        border-radius: 0;
        animation: slideInLeft 0.3s ease;
    }

    @keyframes slideInLeft {
        from {
            opacity: 0;
            transform: translateX(-100%);
        }
        to {
            opacity: 1;
            transform: translateX(0);
        }
    }

    #main-wrapper[data-layout="vertical"][data-sidebartype="full"] .right-side {
        display: none;
    }

    /* Right side full width */
    .right-side {
        width: 100% !important;
    }

    /* Content wrapper adjustments */
    .content-wrapper {
        border-radius: var(--radius-xl);
    }

    /* Sidebar nav adjustments */
    .sidebar-nav ul .sidebar-item .sidebar-link {
        padding: 14px 18px;
    }

    /* Profile section */
    .left-sidebar .profile {
        margin-bottom: 50px;
    }

    .avatar-profile {
        width: 90px;
        height: 90px;
    }
}

/* [ DESKTOP - Medium ] */
@media (max-width: 1199.98px) {
    /* Sidebar width adjustment */
    .left-sidebar {
        width: min(100%, 240px);
    }

    .right-side {
        width: calc(100% - 240px);
    }

    /* Brand logo */
    .brand-logo .logo-img .img-fluid {
        width: 110px;
    }

    /* Dashboard cards */
    .dashboard .icon {
        width: 55px;
        height: 55px;
    }
}

/* [ DESKTOP - Large ] */
@media (max-width: 1399.98px) {
    /* Slight adjustments for large screens */
    .content-wrapper {
        padding: 25px;
    }
}

/* [ DESKTOP - Extra Large ] */
@media (min-width: 1400px) {
    /* Max width container for very large screens */
    .content-wrapper {
        padding: 35px;
    }

    /* Larger dashboard icons */
    .dashboard .icon {
        width: 65px;
        height: 65px;
    }

    .dashboard .content .amout {
        font-size: 20px;
    }
}

/* [ PRINT STYLES ] */
@media print {
    .left-sidebar,
    .menu-header,
    .btn-action,
    .btn-edit-kandang,
    .tap,
    .offcanvas {
        display: none !important;
    }

    .right-side {
        width: 100% !important;
    }

    .content-wrapper {
        border: none;
        padding: 0;
        box-shadow: none;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* [ REDUCED MOTION ] */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* [ DARK MODE SUPPORT - Future Enhancement ] */
@media (prefers-color-scheme: dark) {
    /* Placeholder for dark mode styles */
    /* Can be enabled in future */
}

/* [ HIGH CONTRAST MODE ] */
@media (prefers-contrast: high) {
    .btn {
        border: 2px solid currentColor !important;
    }

    .card {
        border: 2px solid #333;
    }

    .form-control,
    .form-select {
        border-width: 2px;
    }
}

/* [ TOUCH DEVICE OPTIMIZATIONS ] */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .btn {
        min-height: 44px;
        min-width: 44px;
    }

    .sidebar-nav ul .sidebar-item .sidebar-link {
        padding: 14px 16px;
    }

    .btn-action {
        padding: 12px;
    }

    /* Remove hover effects on touch */
    .card-thumbnail:hover,
    .btn:hover,
    .tap:hover {
        transform: none;
    }
}

/* [ LANDSCAPE MOBILE ] */
@media (max-height: 500px) and (orientation: landscape) {
    .left-sidebar .profile {
        margin-bottom: 30px;
    }

    .avatar-profile {
        width: 70px;
        height: 70px;
    }

    .left-sidebar .scroll-sidebar {
        max-height: calc(100vh - 250px);
    }
}
