/* ============================================================
   teknisi.css — SIPDAM Teknisi Page
   Theme: Light Green (sama dengan dashboard)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Figtree:wght@400;500;600;700;800&display=swap');

:root {
    --tek-green:    #1a7a4a;
    --tek-green-m:  #2d9e63;
    --tek-green-l:  #e8f7ee;
    --tek-green-l2: #d0eedd;
    --tek-teal:     #0d9488;
    --tek-blue:     #2563eb;
    --tek-blue-l:   #eff6ff;
    --tek-violet:   #7c3aed;
    --tek-violet-l: #f5f3ff;
    --tek-amber:    #d97706;
    --tek-amber-l:  #fffbeb;
    --tek-rose:     #dc2626;
    --tek-rose-l:   #fff1f2;
    --tek-cyan:     #0891b2;
    --tek-cyan-l:   #ecfeff;
    --tek-border:   #d1e8da;
    --tek-t1:       #0f172a;
    --tek-t2:       #334155;
    --tek-t3:       #64748b;
    --tek-t4:       #94a3b8;
    --tek-bg:       #f0f7f3;
    --tek-white:    #ffffff;
    --tek-font:     'Figtree', 'Segoe UI', sans-serif;
}

/* ── Page header ── */
.tek-icon-wrap {
    width: 44px; height: 44px; border-radius: 12px;
    background: linear-gradient(135deg, var(--tek-green), var(--tek-green-m));
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 18px;
    box-shadow: 0 4px 14px rgba(26,122,74,0.25);
}
.tek-page-title {
    font-family: var(--tek-font); font-size: 20px;
    font-weight: 700; color: var(--tek-t1); line-height: 1;
}
.tek-page-sub { font-size: 12px; color: var(--tek-t3); margin-top: 3px; }

.tek-btn-primary {
    font-family: var(--tek-font);
    background: linear-gradient(135deg, var(--tek-green), var(--tek-green-m));
    color: #fff; font-weight: 700; font-size: 13px;
    padding: 10px 20px; border-radius: 10px; border: none; cursor: pointer;
    display: flex; align-items: center; gap: 8px; transition: all .2s;
    box-shadow: 0 4px 14px rgba(26,122,74,0.25);
}
.tek-btn-primary:hover { transform: translateY(-2px); opacity: .9; }

/* ── Wrap ── */
.tek-wrap { padding: 28px 0; background: var(--tek-bg); min-height: 100vh; }
.tek-inner { max-width: 1400px; margin: 0 auto; padding: 0 24px; }

/* ── Stats ── */
.tek-stats {
    display: grid; grid-template-columns: repeat(3,1fr);
    gap: 16px; margin-bottom: 24px;
}
@media(max-width:720px){ .tek-stats { grid-template-columns: 1fr; } }

.tek-stat {
    background: var(--tek-white);
    border-radius: 16px; padding: 22px;
    position: relative; overflow: hidden;
    transition: transform .2s, box-shadow .2s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.tek-stat:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(26,122,74,0.12); }
.tek-stat::before { content:''; position:absolute; bottom:0; left:0; right:0; height:3px; border-radius: 0 0 16px 16px; }
.tek-stat-total::before    { background: linear-gradient(90deg, var(--tek-green), var(--tek-green-m)); }
.tek-stat-aktif::before    { background: linear-gradient(90deg, var(--tek-teal), #06b6d4); }
.tek-stat-nonaktif::before { background: linear-gradient(90deg, var(--tek-rose), #f87171); }

.tek-stat-label {
    font-family: var(--tek-font); font-size: 10px; font-weight: 700;
    letter-spacing: .08em; text-transform: uppercase;
    color: var(--tek-t3); margin-bottom: 10px;
}
.tek-stat-val {
    font-family: var(--tek-font); font-size: 38px;
    font-weight: 800; color: var(--tek-t1); line-height: 1; margin-bottom: 6px;
}
.tek-stat-sub { font-size: 11px; color: var(--tek-t3); }
.tek-stat-icon {
    position: absolute; right: 18px; top: 18px;
    width: 42px; height: 42px; border-radius: 11px;
    display: flex; align-items: center; justify-content: center; font-size: 17px;
}
.tek-stat-total    .tek-stat-icon { background: var(--tek-green-l);  color: var(--tek-green); }
.tek-stat-aktif    .tek-stat-icon { background: var(--tek-cyan-l);   color: var(--tek-cyan); }
.tek-stat-nonaktif .tek-stat-icon { background: var(--tek-rose-l);   color: var(--tek-rose); }

/* ── Toolbar ── */
.tek-toolbar {
    display: flex; align-items: center; gap: 12px;
    flex-wrap: wrap; margin-bottom: 18px;
}
.tek-search-wrap { flex: 1; min-width: 220px; position: relative; }
.tek-search-wrap i {
    position: absolute; left: 14px; top: 50%;
    transform: translateY(-50%); color: var(--tek-t4);
    font-size: 13px; pointer-events: none;
}
.tek-search-input {
    width: 100%; background: var(--tek-white);
    border: 1px solid var(--tek-border); color: var(--tek-t1);
    border-radius: 10px; padding: 11px 14px 11px 38px;
    font-family: var(--tek-font); font-size: 13px;
    outline: none; transition: border-color .2s;
}
.tek-search-input::placeholder { color: var(--tek-t4); }
.tek-search-input:focus { border-color: var(--tek-green); box-shadow: 0 0 0 3px rgba(26,122,74,0.08); }

.tek-refresh-btn {
    width: 42px; height: 42px; border-radius: 10px;
    background: var(--tek-white); border: 1px solid var(--tek-border);
    color: var(--tek-t3); display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all .2s; font-size: 13px;
}
.tek-refresh-btn:hover {
    border-color: var(--tek-green); color: var(--tek-green);
    background: var(--tek-green-l);
}
.tek-refresh-btn.spinning i { animation: tek-spin .7s linear infinite; }
@keyframes tek-spin { to { transform: rotate(360deg); } }

/* ── Panel ── */
.tek-panel {
    background: var(--tek-white); border: 1px solid var(--tek-border);
    border-radius: 16px; overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.tek-panel-head {
    padding: 16px 24px; border-bottom: 1px solid var(--tek-border);
    display: flex; align-items: center; justify-content: space-between;
    background: #f8fdf9;
}
.tek-panel-head-left {
    font-family: var(--tek-font); font-size: 13px;
    font-weight: 700; color: var(--tek-t1);
    display: flex; align-items: center; gap: 8px;
}
.tek-panel-head-right { font-size: 12px; color: var(--tek-t3); }

/* ── Table ── */
.tek-table { width: 100%; border-collapse: collapse; }
.tek-table thead tr { background: #f8fdf9; }
.tek-table th {
    padding: 13px 18px; text-align: left;
    font-family: var(--tek-font); font-size: 10px; font-weight: 700;
    letter-spacing: .08em; text-transform: uppercase; color: var(--tek-t3);
    border-bottom: 1px solid var(--tek-border);
}
.tek-table th:first-child, .tek-table th:last-child { text-align: center; }
.tek-table td {
    padding: 14px 18px; border-bottom: 1px solid #f0f7f3;
    vertical-align: middle; color: var(--tek-t2); font-size: 13px;
    font-family: var(--tek-font);
}
.tek-table tr:last-child td { border-bottom: none; }
.tek-table tbody tr { transition: background .15s; }
.tek-table tbody tr:hover { background: #f8fdf9; }

.tek-rownum {
    width: 28px; height: 28px; border-radius: 7px;
    background: var(--tek-green-l); border: 1px solid var(--tek-green-l2);
    color: var(--tek-green); font-size: 11px; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center; margin: auto;
}

/* Teknisi cell */
.tek-av-wrap { display: flex; align-items: center; gap: 12px; }
.tek-av {
    width: 40px; height: 40px; border-radius: 11px; flex-shrink: 0; position: relative;
    background: linear-gradient(135deg, var(--tek-green), var(--tek-green-m));
    color: #fff; font-size: 14px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.tek-av-dot {
    position: absolute; bottom: -2px; right: -2px;
    width: 11px; height: 11px; border-radius: 50%;
    border: 2px solid var(--tek-white);
}
.tek-av-dot.aktif    { background: #22c55e; }
.tek-av-dot.nonaktif { background: var(--tek-rose); }
.tek-av-name { font-size: 13px; font-weight: 600; color: var(--tek-t1); font-family: var(--tek-font); }
.tek-av-sub  { font-size: 11px; color: var(--tek-t3); margin-top: 2px; }

/* Info chip */
.tek-info-chip {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: 12px; color: var(--tek-t2); font-family: var(--tek-font);
}
.tek-info-chip i { font-size: 11px; }
.tek-info-chip.empty { color: var(--tek-t4); font-style: italic; }

/* Badge */
.tek-badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 10px; border-radius: 99px;
    font-size: 11px; font-weight: 700; font-family: var(--tek-font); border: 1px solid;
}
.tek-badge-green { background: var(--tek-green-l); color: var(--tek-green); border-color: var(--tek-green-l2); }
.tek-badge-rose  { background: var(--tek-rose-l);  color: var(--tek-rose);  border-color: #fca5a5; }

/* Action btn */
.tek-actions { display: flex; align-items: center; justify-content: center; gap: 6px; }
.tek-action-btn {
    width: 32px; height: 32px; border-radius: 8px;
    border: 1px solid var(--tek-border); background: transparent;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all .2s; font-size: 12px;
}
.tek-action-edit { color: var(--tek-teal); }
.tek-action-edit:hover { background: var(--tek-cyan-l); border-color: var(--tek-teal); }
.tek-action-del  { color: var(--tek-rose); }
.tek-action-del:hover  { background: var(--tek-rose-l); border-color: var(--tek-rose); }

/* Empty / loading */
.tek-center-state { padding: 72px 20px; text-align: center; }
.tek-state-icon {
    width: 68px; height: 68px; border-radius: 16px;
    background: var(--tek-green-l); border: 1px solid var(--tek-green-l2);
    margin: 0 auto 18px; display: flex; align-items: center; justify-content: center;
    font-size: 26px; color: var(--tek-green);
}
.tek-state-title {
    font-family: var(--tek-font); font-size: 14px;
    font-weight: 700; color: var(--tek-t2); margin-bottom: 5px;
}
.tek-state-sub { font-size: 12px; color: var(--tek-t3); }
.tek-spinner-ring {
    width: 48px; height: 48px; border-radius: 50%;
    border: 3px solid var(--tek-border); border-top-color: var(--tek-green);
    animation: tek-spin .7s linear infinite;
    margin: 0 auto 18px;
}

/* Pagination strip */
.tek-pag {
    padding: 14px 24px; border-top: 1px solid var(--tek-border);
    background: #f8fdf9; display: flex; align-items: center; gap: 8px;
}
.tek-pag-info { font-size: 12px; color: var(--tek-t3); font-family: var(--tek-font); }
.tek-pag-accent { color: var(--tek-green); font-weight: 700; }

/* ── Toast ── */
.tek-toast {
    position: fixed; top: 20px; right: 20px; z-index: 999;
    padding: 14px 18px; border-radius: 12px;
    display: flex; align-items: center; gap: 10px;
    font-size: 13px; font-family: var(--tek-font); font-weight: 600;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    animation: tek-toastIn .3s cubic-bezier(.34,1.56,.64,1);
    transition: opacity .4s, transform .4s;
}
@keyframes tek-toastIn {
    from { opacity:0; transform: translateX(30px); }
    to   { opacity:1; transform: none; }
}
.tek-toast-ok  {
    background: var(--tek-white); border: 1px solid var(--tek-green-l2);
    color: var(--tek-green);
}
.tek-toast-err {
    background: var(--tek-white); border: 1px solid #fca5a5;
    color: var(--tek-rose);
}

/* ── Modal ── */
.tek-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.5); backdrop-filter: blur(4px);
    z-index: 50; overflow-y: auto;
}
.tek-overlay.show {
    display: flex; align-items: flex-start;
    justify-content: center; padding: 40px 16px;
}
.tek-modal {
    background: var(--tek-white); border: 1px solid var(--tek-border);
    border-radius: 20px; width: 100%; max-width: 760px;
    box-shadow: 0 24px 60px rgba(0,0,0,0.15); overflow: hidden;
    animation: tek-modalIn .25s cubic-bezier(.34,1.56,.64,1);
}
@keyframes tek-modalIn {
    from { opacity:0; transform: scale(.94) translateY(12px); }
    to   { opacity:1; transform: none; }
}
.tek-modal-stripe {
    height: 3px;
    background: linear-gradient(90deg, var(--tek-green), var(--tek-green-m), var(--tek-teal));
}
.tek-modal-inner { padding: 28px 32px 32px; }
.tek-modal-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 26px; padding-bottom: 18px;
    border-bottom: 1px solid var(--tek-border);
}
.tek-modal-title {
    font-family: var(--tek-font); font-size: 17px;
    font-weight: 700; color: var(--tek-t1);
    display: flex; align-items: center; gap: 10px;
}
.tek-modal-title i { color: var(--tek-green); }
.tek-close-btn {
    width: 32px; height: 32px; border-radius: 8px;
    border: 1px solid var(--tek-border); color: var(--tek-t3);
    background: transparent; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; transition: all .2s;
}
.tek-close-btn:hover { border-color: var(--tek-rose); color: var(--tek-rose); }

/* Form grid */
.tek-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media(max-width:600px) { .tek-form-grid { grid-template-columns: 1fr; } }
.tek-form-full { grid-column: 1/-1; }

.tek-form-field { display: flex; flex-direction: column; gap: 7px; }
.tek-form-label {
    font-size: 11px; font-weight: 700; letter-spacing: .06em;
    text-transform: uppercase; color: var(--tek-t2);
    display: flex; align-items: center; gap: 6px;
}
.tek-form-label i    { font-size: 10px; color: var(--tek-green); }
.tek-form-label .req { color: var(--tek-rose); }
.tek-form-label .opt  { color: var(--tek-t4); font-weight: 400; text-transform: none; letter-spacing: 0; font-size: 10px; }
.tek-form-label .hint { color: var(--tek-t4); font-weight: 400; text-transform: none; letter-spacing: 0; font-size: 10px; }

.tek-input, .tek-select, .tek-textarea {
    background: var(--tek-bg); border: 1px solid var(--tek-border);
    color: var(--tek-t1); border-radius: 10px; padding: 11px 14px;
    font-family: var(--tek-font); font-size: 13px;
    outline: none; transition: border-color .2s, box-shadow .2s; width: 100%;
}
.tek-input:focus, .tek-select:focus, .tek-textarea:focus {
    border-color: var(--tek-green);
    box-shadow: 0 0 0 3px rgba(26,122,74,0.08);
}
.tek-input::placeholder, .tek-textarea::placeholder { color: var(--tek-t4); }
.tek-textarea { resize: none; }
.tek-input.readonly-field {
    background: #f1f5f9; color: var(--tek-t4); cursor: not-allowed;
}

.tek-modal-footer {
    display: flex; align-items: center; justify-content: flex-end;
    gap: 10px; padding-top: 22px; margin-top: 6px;
    border-top: 1px solid var(--tek-border);
}
.tek-btn-cancel {
    padding: 10px 20px; border-radius: 10px; font-size: 13px;
    font-weight: 600; font-family: var(--tek-font);
    background: transparent; border: 1px solid var(--tek-border);
    color: var(--tek-t2); cursor: pointer;
    display: flex; align-items: center; gap: 7px; transition: all .2s;
}
.tek-btn-cancel:hover { border-color: var(--tek-rose); color: var(--tek-rose); }
.tek-btn-submit {
    padding: 10px 24px; border-radius: 10px; font-size: 13px;
    font-weight: 700; font-family: var(--tek-font);
    background: linear-gradient(135deg, var(--tek-green), var(--tek-green-m));
    color: #fff; border: none; cursor: pointer;
    display: flex; align-items: center; gap: 7px; transition: all .2s;
    box-shadow: 0 4px 14px rgba(26,122,74,0.25);
}
.tek-btn-submit:hover { opacity: .9; transform: translateY(-1px); }
.tek-btn-submit:disabled { opacity: .5; cursor: not-allowed; transform: none; }