*{
    box-sizing:border-box;
}

body{
    margin:0;
    padding:0;
    font-family:Arial, Helvetica, sans-serif;
    background:#f8fafc;
    color:#0f172a;
}

a{
    text-decoration:none;
}

.karesa-page{
    max-width:1320px;
    margin:24px auto;
    padding:0 16px;
}

.karesa-auth-wrap{
    min-height:70vh;
    display:flex;
    justify-content:center;
    align-items:center;
    background:linear-gradient(135deg,#f8fbff,#eef5f2);
}

.karesa-auth-card{
    width:100%;
    max-width:460px;
    background:#fff;
    border:1px solid #e5e7eb;
    border-radius:20px;
    box-shadow:0 14px 30px rgba(0,0,0,.08);
    padding:32px;
}

.karesa-auth-title{
    margin:0 0 8px;
    font-size:28px;
    color:#0f172a;
}

.karesa-auth-sub{
    margin:0 0 20px;
    color:#64748b;
}

.karesa-layout{
    display:grid;
    grid-template-columns:280px minmax(0, 1fr);
    gap:24px;
    align-items:start;
}

.karesa-sidebar{
    background:#ffffff;
    color:#0f172a;
    border-radius:20px;
    padding:24px 18px;
    border:1px solid #e2e8f0;
    box-shadow:0 4px 18px rgba(15,23,42,.04);
    height:fit-content;
    position:sticky;
    top:20px;
}

.karesa-sidebar-head{
    margin-bottom:20px;
}

.karesa-sidebar h2{
    margin:0 0 18px;
    font-size:20px;
    font-weight:800;
    letter-spacing:.03em;
    color:#0f172a;
}

.karesa-sidebar-user{
    font-size:15px;
    font-weight:700;
    color:#0f172a;
    margin-bottom:8px;
}

.karesa-sidebar-role{
    display:inline-flex;
    align-items:center;
    padding:7px 11px;
    border-radius:999px;
    font-size:12px;
    font-weight:700;
    color:#1d4ed8;
    background:#eff6ff;
    border:1px solid #bfdbfe;
}

.karesa-badge{
    display:inline-flex;
    align-items:center;
    background:#eff6ff;
    color:#1d4ed8;
    padding:7px 11px;
    border-radius:999px;
    font-size:12px;
    font-weight:700;
    border:1px solid #bfdbfe;
}

.karesa-menu{
    display:flex !important;
    flex-direction:column !important;
    gap:10px !important;
    margin:0 !important;
    padding:0 !important;
    width:100%;
}

.karesa-menu a{
    display:flex !important;
    align-items:center !important;
    gap:12px !important;
    width:100%;
    padding:13px 14px;
    background:#f8fafc;
    color:#334155 !important;
    text-decoration:none !important;
    border-radius:14px;
    font-weight:600;
    font-size:15px;
    line-height:1.2;
    border:1px solid transparent;
    transition:all .2s ease;
    box-shadow:none;
}

.karesa-menu a:hover{
    background:#eef2ff;
    color:#1d4ed8 !important;
    border-color:#dbeafe;
    transform:translateX(2px);
}

.karesa-menu a.active{
    background:#2563eb;
    color:#fff !important;
    border-color:#2563eb;
    box-shadow:0 10px 24px rgba(37,99,235,.18);
}

.karesa-menu a,
.karesa-menu a:hover,
.karesa-menu a:focus,
.karesa-menu a:active,
.karesa-menu a:visited{
    text-decoration:none !important;
}

.karesa-menu-icon{
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    width:20px;
    min-width:20px;
    height:20px;
    line-height:1;
    flex:0 0 20px;
}

.karesa-menu-icon svg{
    display:block;
    width:18px;
    height:18px;
    stroke:currentColor;
    fill:none;
    stroke-width:2;
    stroke-linecap:round;
    stroke-linejoin:round;
}

.karesa-menu-text{
    display:inline-block;
    line-height:1.2;
    font-size:14px;
}

.karesa-main-top{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:14px;
    flex-wrap:wrap;
    margin-bottom:18px;
}

.karesa-title{
    margin:0;
    font-size:30px;
    color:#0f172a;
}

.karesa-sub{
    margin:4px 0 0;
    color:#64748b;
}

.karesa-stats{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:16px;
    margin-bottom:18px;
}

.karesa-stat{
    background:#fff;
    border:1px solid #e2e8f0;
    border-radius:20px;
    padding:18px;
    box-shadow:0 8px 20px rgba(15,23,42,.04);
}

.karesa-stat small{
    display:block;
    color:#64748b;
    margin-bottom:8px;
}

.karesa-stat strong{
    font-size:28px;
    color:#0f172a;
}

.karesa-card{
    background:#fff;
    border:1px solid #e5e7eb;
    border-radius:20px;
    padding:22px;
    box-shadow:0 10px 24px rgba(15,23,42,.05);
    margin:18px 0;
}

.karesa-card h3{
    margin-top:0;
    margin-bottom:14px;
    color:#0f172a;
}

.karesa-grid-2{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:18px;
}

.karesa-field{
    margin-bottom:16px;
}

.karesa-field label{
    display:block;
    margin-bottom:8px;
    font-weight:600;
    color:#334155;
}

.karesa-field input,
.karesa-field select,
.karesa-field textarea{
    width:100%;
    min-height:48px;
    padding:12px 14px;
    border:1px solid #cbd5e1;
    border-radius:12px;
    box-sizing:border-box;
    font-size:15px;
    line-height:1.5;
    background:#fff;
    color:#0f172a;
}

.karesa-field input:focus,
.karesa-field select:focus,
.karesa-field textarea:focus{
    outline:none;
    border-color:#60a5fa;
    box-shadow:0 0 0 3px rgba(96,165,250,.18);
}

.karesa-field select{
    height:48px;
    line-height:48px;
    appearance:auto;
}

.karesa-field textarea{
    min-height:120px;
    line-height:1.6;
    resize:vertical;
}

.karesa-btn{
    display:inline-block;
    background:#2563eb;
    color:#fff !important;
    border:none;
    padding:12px 18px;
    border-radius:12px;
    text-decoration:none;
    font-weight:600;
    cursor:pointer;
    transition:all .2s ease;
}

.karesa-btn:hover{
    background:#1d4ed8;
}

.karesa-btn-secondary{
    display:inline-block;
    background:#f8fafc;
    color:#0f172a !important;
    border:1px solid #cbd5e1;
    padding:10px 16px;
    border-radius:12px;
    text-decoration:none;
    font-weight:600;
    cursor:pointer;
    transition:all .2s ease;
}

.karesa-btn-secondary:hover{
    background:#eef2ff;
    border-color:#93c5fd;
}

.karesa-btn-success{
    display:inline-block;
    background:#15803d;
    color:#fff !important;
    border:none;
    padding:10px 14px;
    border-radius:12px;
    text-decoration:none;
    font-weight:600;
    cursor:pointer;
    transition:all .2s ease;
}

.karesa-btn-success:hover{
    background:#166534;
}

.karesa-success{
    padding:14px;
    background:#ecfdf3;
    border:1px solid #86efac;
    color:#166534;
    border-radius:12px;
    margin:14px 0;
}

.karesa-error{
    padding:14px;
    background:#fef2f2;
    border:1px solid #fca5a5;
    color:#991b1b;
    border-radius:12px;
    margin:14px 0;
}

.karesa-table-wrap{
    overflow:auto;
    border:1px solid #e2e8f0;
    border-radius:16px;
}

.karesa-table{
    width:100%;
    border-collapse:collapse;
    background:#fff;
}

.karesa-table th,
.karesa-table td{
    padding:13px 15px;
    border-bottom:1px solid #e2e8f0;
    text-align:left;
    vertical-align:top;
}

.karesa-table th{
    background:#f8fafc;
    color:#334155;
    font-size:13px;
    font-weight:700;
}

.karesa-table tr:last-child td{
    border-bottom:none;
}

.karesa-status{
    display:inline-block;
    padding:6px 10px;
    border-radius:999px;
    font-size:12px;
    font-weight:700;
}

.karesa-status-created{
    background:#eff6ff;
    color:#1d4ed8;
}

.karesa-status-harvested{
    background:#ecfdf3;
    color:#15803d;
}

.karesa-status-dispatched{
    background:#fff7ed;
    color:#c2410c;
}

.karesa-status-received{
    background:#f5f3ff;
    color:#6d28d9;
}

@media(max-width:1024px){
    .karesa-layout{
        grid-template-columns:1fr;
    }

    .karesa-sidebar{
        position:static;
    }

    .karesa-stats,
    .karesa-grid-2{
        grid-template-columns:1fr;
    }
}

@media(max-width:640px){
    .karesa-page{
        padding:0 12px;
    }

    .karesa-sidebar{
        padding:18px 14px;
    }

    .karesa-title{
        font-size:24px;
    }

    .karesa-card{
        padding:18px;
    }

    .karesa-table th,
    .karesa-table td{
        padding:10px 12px;
    }
}