/* ==========================================================
   BUTTON SYSTEM
========================================================== */

.btn{

    position:relative;

    display:inline-flex;

    align-items:center;

    justify-content:center;

    gap:12px;

    min-width:170px;

    height:56px;

    padding:0 30px;

    border:none;

    border-radius:18px;

    background:none;

    font-size:1rem;

    font-weight:700;

    line-height:1;

    text-decoration:none;

    cursor:pointer;

    user-select:none;

    white-space:nowrap;

    overflow:hidden;

    isolation:isolate;

    transition:

        transform .25s var(--ease-premium),

        box-shadow .25s var(--ease-premium),

        background .25s,

        color .25s,

        border-color .25s;

}

/* ==========================================================
   BUTTON SHINE
========================================================== */

.btn::before{

    content:"";

    position:absolute;

    inset:0;

    background:

    linear-gradient(

        120deg,

        transparent,

        rgba(255,255,255,.30),

        transparent

    );

    transform:translateX(-140%);

    transition:transform .8s ease;

    z-index:1;

}

.btn:hover::before{

    transform:translateX(140%);

}

.btn>*{

    position:relative;

    z-index:2;

}

/* ==========================================================
   BUTTON STATES
========================================================== */

.btn:hover{

    transform:translateY(-3px);

}

.btn:active{

    transform:translateY(0);

}

.btn:disabled{

    opacity:.55;

    cursor:not-allowed;

    pointer-events:none;

}

/* ==========================================================
   PRIMARY BUTTON
========================================================== */

.btn-primary{

    color:#fff;

    background:var(--gradient-hero);

    box-shadow:var(--shadow-primary);

}

.btn-primary:hover{

    box-shadow:0 28px 60px rgba(37,99,235,.35);

}

/* ==========================================================
   SECONDARY BUTTON
========================================================== */

.btn-secondary{

    background:var(--bg-card);

    color:var(--text-primary);

    border:1px solid var(--border-color);

}

.btn-secondary:hover{

    border-color:rgba(37,99,235,.18);

    box-shadow:var(--shadow-md);

}

/* ==========================================================
   OUTLINE BUTTON
========================================================== */

.btn-outline{

    background:transparent;

    border:2px solid var(--color-primary);

    color:var(--color-primary);

}

.btn-outline:hover{

    background:var(--color-primary);

    color:#fff;

}

/* ==========================================================
   GHOST BUTTON
========================================================== */

.btn-ghost{

    background:transparent;

    color:var(--text-secondary);

}

.btn-ghost:hover{

    background:rgba(37,99,235,.08);

    color:var(--color-primary);

}

/* ==========================================================
   SUCCESS BUTTON
========================================================== */

.btn-success{

    background:var(--color-success);

    color:#fff;

}

/* ==========================================================
   DANGER BUTTON
========================================================== */

.btn-danger{

    background:var(--color-danger);

    color:#fff;

}

/* ==========================================================
   BUTTON SIZES
========================================================== */

.btn-sm{

    height:44px;

    padding:0 18px;

    font-size:.88rem;

    border-radius:14px;

}

.btn-lg{

    height:64px;

    padding:0 36px;

    font-size:1.08rem;

    border-radius:20px;

}

/* ==========================================================
   ICON BUTTON
========================================================== */

.btn-icon{

    width:56px;

    min-width:56px;

    padding:0;

}

.btn svg{

    flex-shrink:0;

}

/* ==========================================================
   INPUT
========================================================== */

.input{

    width:100%;

    height:56px;

    padding:0 18px;

    border-radius:16px;

    background:var(--bg-card);

    border:1px solid var(--border-color);

    color:var(--text-primary);

    transition:

        border-color .25s,

        box-shadow .25s,

        background .25s;

}

.input:hover{

    border-color:rgba(37,99,235,.18);

}

.input:focus{

    border-color:var(--border-focus);

    box-shadow:0 0 0 4px rgba(37,99,235,.10);

}

/* ==========================================================
   BADGES
========================================================== */

.badge{

    display:inline-flex;

    align-items:center;

    justify-content:center;

    gap:8px;

    padding:8px 14px;

    border-radius:999px;

    font-size:.78rem;

    font-weight:700;

    letter-spacing:.02em;

}

.badge-primary{

    background:rgba(37,99,235,.08);

    color:var(--color-primary);

}

.badge-success{

    background:rgba(22,163,74,.10);

    color:var(--color-success);

}

.badge-warning{

    background:rgba(245,158,11,.12);

    color:var(--color-warning);

}

.badge-danger{

    background:rgba(239,68,68,.12);

    color:var(--color-danger);

}

/* ==========================================================
   STATUS BADGES
========================================================== */

.status-badge{

    display:inline-flex;

    align-items:center;

    gap:8px;

    padding:8px 14px;

    border-radius:999px;

    font-size:.75rem;

    font-weight:700;

    white-space:nowrap;

}

.status-badge.success{

    background:rgba(22,163,74,.10);

    color:var(--color-success);

}

.status-badge.warning{

    background:rgba(245,158,11,.10);

    color:var(--color-warning);

}

.status-badge.info{

    background:rgba(37,99,235,.10);

    color:var(--color-primary);

}

.status-badge.danger{

    background:rgba(239,68,68,.10);

    color:var(--color-danger);

}

/* ==========================================================
   PAGINATION
========================================================== */

.pagination{

    display:flex;

    justify-content:center;

    align-items:center;

    flex-wrap:wrap;

    gap:14px;

    margin-top:72px;

}

.page-btn{

    width:50px;

    height:50px;

    display:grid;

    place-items:center;

    border-radius:16px;

    background:var(--bg-card);

    border:1px solid var(--border-color);

    color:var(--text-primary);

    font-size:.95rem;

    font-weight:700;

    cursor:pointer;

    transition:

        transform .25s var(--ease-premium),

        background .25s,

        color .25s,

        border-color .25s,

        box-shadow .25s;

}

.page-btn:hover{

    transform:translateY(-3px);

    border-color:rgba(37,99,235,.18);

    box-shadow:var(--shadow-md);

}

.page-btn.active{

    color:#fff;

    border-color:transparent;

    background:var(--gradient-hero);

    box-shadow:var(--shadow-primary);

}

.page-btn:disabled{

    opacity:.45;

    pointer-events:none;

}

/* ==========================================================
   CHIP
========================================================== */

.chip{

    display:inline-flex;

    align-items:center;

    justify-content:center;

    gap:8px;

    height:40px;

    padding:0 16px;

    border-radius:999px;

    background:var(--bg-card);

    border:1px solid var(--border-color);

    color:var(--text-secondary);

    font-size:.82rem;

    font-weight:600;

    transition:

        background .25s,

        color .25s,

        border-color .25s,

        transform .25s,

        box-shadow .25s;

}

.chip:hover{

    transform:translateY(-2px);

    border-color:rgba(37,99,235,.18);

    color:var(--color-primary);

    box-shadow:var(--shadow-sm);

}

.chip.active{

    background:var(--gradient-hero);

    border-color:transparent;

    color:#fff;

}

/* ==========================================================
   GLASS CARD
========================================================== */

.glass-card{

    position:relative;

    overflow:hidden;

    background:var(--bg-glass);

    backdrop-filter:blur(20px);

    -webkit-backdrop-filter:blur(20px);

    border:1px solid rgba(255,255,255,.35);

    border-radius:24px;

    box-shadow:var(--shadow-lg);

}

.glass-card::before{

    content:"";

    position:absolute;

    inset:0;

    background:

        linear-gradient(

            180deg,

            rgba(255,255,255,.08),

            transparent

        );

    pointer-events:none;

}

/* ==========================================================
   SURFACE CARD
========================================================== */

.surface-card{

    background:var(--bg-card);

    border:1px solid var(--border-color);

    border-radius:24px;

    box-shadow:var(--shadow-sm);

    transition:

        transform .3s,

        box-shadow .3s,

        border-color .3s;

}

.surface-card:hover{

    transform:translateY(-6px);

    border-color:rgba(37,99,235,.18);

    box-shadow:var(--shadow-lg);

}

/* ==========================================================
   CARD HEADER
========================================================== */

.card-header{

    display:flex;

    justify-content:space-between;

    align-items:center;

    gap:18px;

    padding-bottom:20px;

    margin-bottom:20px;

    border-bottom:1px solid var(--border-color);

}

.card-title{

    font-size:1.35rem;

    font-weight:800;

    color:var(--text-primary);

}

.card-subtitle{

    margin-top:6px;

    color:var(--text-secondary);

    font-size:.95rem;

}

/* ==========================================================
   CARD BODY
========================================================== */

.card-body{

    display:flex;

    flex-direction:column;

    gap:20px;

}

/* ==========================================================
   CARD FOOTER
========================================================== */

.card-footer{

    display:flex;

    justify-content:space-between;

    align-items:center;

    gap:18px;

    padding-top:22px;

    margin-top:22px;

    border-top:1px solid var(--border-color);

}

/* ==========================================================
   DIVIDER
========================================================== */

.divider{

    width:100%;

    height:1px;

    background:var(--border-color);

}

.divider.vertical{

    width:1px;

    height:auto;

    align-self:stretch;

}

/* ==========================================================
   AVATAR
========================================================== */

.avatar{

    width:48px;

    height:48px;

    border-radius:50%;

    object-fit:cover;

    flex-shrink:0;

}

.avatar-group{

    display:flex;

    align-items:center;

}

.avatar-group .avatar{

    margin-left:-12px;

    border:3px solid var(--bg-card);

}

.avatar-group .avatar:first-child{

    margin-left:0;

}

/* ==========================================================
   ICON WRAPPER
========================================================== */

.icon-box{

    width:54px;

    height:54px;

    display:grid;

    place-items:center;

    border-radius:18px;

    background:rgba(37,99,235,.08);

    color:var(--color-primary);

    flex-shrink:0;

}

/* ==========================================================
   EMPTY STATE
========================================================== */

.empty-state{

    display:flex;

    flex-direction:column;

    align-items:center;

    justify-content:center;

    text-align:center;

    gap:20px;

    padding:70px 20px;

}

.empty-state h3{

    font-size:1.4rem;

    font-weight:800;

    color:var(--text-primary);

}

.empty-state p{

    max-width:520px;

    color:var(--text-secondary);

    line-height:1.8;

}

/* ==========================================================
   MODAL
========================================================== */

.modal{

    position:fixed;

    inset:0;

    display:flex;

    justify-content:center;

    align-items:center;

    padding:32px;

    opacity:0;

    visibility:hidden;

    pointer-events:none;

    transition:

        opacity .35s ease,

        visibility .35s ease;

    z-index:var(--z-modal);

}

.modal.active{

    opacity:1;

    visibility:visible;

    pointer-events:auto;

}

/* ==========================================================
   MODAL OVERLAY
========================================================== */

.modal-overlay{

    position:absolute;

    inset:0;

    background:rgba(15,23,42,.62);

    backdrop-filter:blur(14px);

    -webkit-backdrop-filter:blur(14px);

}

/* ==========================================================
   MODAL CONTAINER
========================================================== */

.modal-container{

    position:relative;

    width:min(900px,100%);

    max-height:90vh;

    display:flex;

    flex-direction:column;

    overflow:hidden;

    border-radius:30px;

    background:var(--bg-card);

    border:1px solid var(--border-color);

    box-shadow:var(--shadow-xl);

    animation:modalIn .35s var(--ease-premium);

    z-index:2;

}

/* ==========================================================
   MODAL HEADER
========================================================== */

.modal-header{

    display:flex;

    justify-content:space-between;

    align-items:center;

    gap:20px;

    padding:28px 32px;

    border-bottom:1px solid var(--border-color);

}

.modal-title{

    font-size:1.6rem;

    font-weight:800;

    color:var(--text-primary);

}

.modal-subtitle{

    margin-top:6px;

    color:var(--text-secondary);

    font-size:.95rem;

}

/* ==========================================================
   CLOSE BUTTON
========================================================== */

.modal-close{

    width:48px;

    height:48px;

    display:grid;

    place-items:center;

    flex-shrink:0;

    border-radius:16px;

    background:var(--bg-body);

    border:1px solid var(--border-color);

    color:var(--text-secondary);

    cursor:pointer;

    transition:

        transform .25s,

        background .25s,

        color .25s,

        border-color .25s;

}

.modal-close:hover{

    transform:rotate(90deg);

    color:var(--color-primary);

    background:rgba(37,99,235,.08);

    border-color:rgba(37,99,235,.18);

}

/* ==========================================================
   MODAL BODY
========================================================== */

.modal-body{

    flex:1;

    overflow:auto;

    padding:32px;

}

.modal-body::-webkit-scrollbar{

    width:8px;

}

/* ==========================================================
   MODAL FOOTER
========================================================== */

.modal-footer{

    display:flex;

    justify-content:flex-end;

    align-items:center;

    gap:16px;

    padding:24px 32px;

    border-top:1px solid var(--border-color);

}

/* ==========================================================
   MODAL SIZES
========================================================== */

.modal-sm .modal-container{

    width:min(420px,100%);

}

.modal-md .modal-container{

    width:min(700px,100%);

}

.modal-lg .modal-container{

    width:min(960px,100%);

}

.modal-xl .modal-container{

    width:min(1200px,100%);

}

/* ==========================================================
   FULLSCREEN
========================================================== */

.modal-full{

    padding:0;

}

.modal-full .modal-container{

    width:100%;

    height:100vh;

    max-height:none;

    border-radius:0;

}

/* ==========================================================
   DRAWER
========================================================== */

.modal-right{

    justify-content:flex-end;

    padding:0;

}

.modal-right .modal-container{

    width:min(430px,100%);

    height:100vh;

    max-height:none;

    border-radius:0;

    animation:fadeRight .35s var(--ease-premium);

}

/* ==========================================================
   IMAGE MODAL
========================================================== */

.modal-image{

    display:block;

    max-width:100%;

    height:auto;

    border-radius:18px;

}

/* ==========================================================
   LOADING
========================================================== */

.modal-loading{

    display:flex;

    justify-content:center;

    align-items:center;

    min-height:250px;

}

/* ==========================================================
   RESPONSIVE
========================================================== */

@media (max-width:768px){

    .modal{

        padding:18px;

    }

    .modal-container{

        border-radius:22px;

    }

    .modal-header{

        padding:22px;

    }

    .modal-body{

        padding:22px;

    }

    .modal-footer{

        padding:22px;

        flex-direction:column;

    }

    .modal-footer .btn{

        width:100%;

    }

}

@media (max-width:576px){

    .modal{

        padding:0;

        align-items:flex-end;

    }

    .modal-container{

        width:100%;

        max-height:92vh;

        border-radius:24px 24px 0 0;

    }

}

/*==========================================================
    TOAST
==========================================================*/

.toast-container{

    position:fixed;

    top:24px;

    right:24px;

    display:flex;

    flex-direction:column;

    gap:16px;

    z-index:var(--z-toast);

    pointer-events:none;

}

.toast{

    min-width:320px;

    max-width:420px;

    padding:18px 20px;

    border-radius:20px;

    background:var(--bg-card);

    border:1px solid var(--border-color);

    border-left:4px solid var(--color-primary);

    box-shadow:var(--shadow-xl);

    animation:toastIn .35s var(--ease-premium);

    pointer-events:auto;

}

.toast.success{

    border-left-color:var(--color-success);

}

.toast.warning{

    border-left-color:var(--color-warning);

}

.toast.error{

    border-left-color:var(--color-danger);

}

/*==========================================================
    SKELETON
==========================================================*/

.skeleton{

    position:relative;

    overflow:hidden;

    border-radius:14px;

    background:var(--skeleton-base);

}

.skeleton::before{

    content:"";

    position:absolute;

    inset:0;

    background:

    linear-gradient(

        90deg,

        transparent,

        var(--skeleton-highlight),

        transparent

    );

    transform:translateX(-100%);

    animation:skeletonLoading 1.2s linear infinite;

}

.skeleton-image{

    width:100%;

    height:220px;

}

.skeleton-title{

    height:26px;

    margin:22px;

}

.skeleton-text{

    height:16px;

    margin:0 22px 14px;

}

.skeleton-price{

    height:48px;

    margin:22px;

}

/*==========================================================
    DIVIDER
==========================================================*/

.divider{

    width:100%;

    height:1px;

    background:var(--border-color);

}

/*==========================================================
    GLASS CARD
==========================================================*/

.glass-card{

    background:var(--bg-glass);

    backdrop-filter:blur(20px);

    -webkit-backdrop-filter:blur(20px);

    border:1px solid rgba(255,255,255,.30);

    box-shadow:var(--shadow-md);

}

/*==========================================================
    EMPTY STATE
==========================================================*/

.empty-state{

    display:flex;

    flex-direction:column;

    align-items:center;

    justify-content:center;

    text-align:center;

    gap:20px;

    padding:80px 24px;

}

.empty-state svg{

    width:72px;

    height:72px;

    color:var(--text-muted);

}

.empty-state h3{

    font-size:1.5rem;

    font-weight:800;

    color:var(--text-primary);

}

.empty-state p{

    max-width:500px;

    color:var(--text-secondary);

    line-height:1.8;

}

/*==========================================================
    LOADER
==========================================================*/

.loader{

    width:52px;

    height:52px;

    border-radius:50%;

    border:4px solid rgba(37,99,235,.12);

    border-top-color:var(--color-primary);

    animation:loaderSpin .9s linear infinite;

}

/*==========================================================
    END
==========================================================*/