:root{
  --c-primary:#E2620E;
  --c-primary-dark:#b0480a;
  --c-accent:#c01222;
  --c-accent-dark:#8e0b18;
  --c-ink:#241a0e;
  --c-text:#3f4a5a;
  --c-muted:#6b7280;
  --c-bg:#ffffff;
  --c-surface:#f7f8fb;
  --c-line:#e6e8ee;
  --c-success:#16a34a;
  --c-warn:#f59e0b;
  --radius:14px;
  --radius-sm:10px;
  --shadow-sm:0 1px 2px rgba(15,23,42,.06), 0 1px 3px rgba(15,23,42,.04);
  --shadow:0 8px 30px rgba(15,23,42,.08);
  --shadow-lg:0 24px 60px -20px rgba(15,23,42,.25);
  --container:1200px;
  --gradient:linear-gradient(135deg,var(--c-primary),var(--c-accent));
  --font-body:'Manrope','Noto Sans Devanagari',system-ui,-apple-system,Segoe UI,Roboto,sans-serif;
  --font-head:'Fraunces','Noto Sans Devanagari',serif,sans-serif;
}
.tem-card.tem-form input{
	width: 100%;
	padding: 11px 14px;
    border: 1px solid var(--c-line);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 14px;
    background: var(--c-surface);
    color: var(--c-text);
}
.tem-card.tem-form .button-primary{
	background: var(--gradient);
    color: #fff;
    box-shadow: var(--shadow-sm);
	width: 100%;
	    display: inline-block;
    padding: 12px 22px;
    border-radius: var(--radius-sm);
    border: none;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 15px;
    transition: .2s all;
}
.tem-card.tem-form label {
    font-weight: 700;
    font-size: 13px;
	color: var(--c-ink);}
/* ============ GLOBAL ============ */
.tem-wrap{max-width:var(--container);margin:30px auto;padding:0 20px;font-family:var(--font-body);color:var(--c-text);}
.tem-wrap *{box-sizing:border-box;}
.tem-card{background:var(--c-bg);border:1px solid var(--c-line);border-radius:var(--radius);box-shadow:var(--shadow-sm);padding:28px;margin-bottom:22px;}
.tem-card h2{font-family:var(--font-head);color:var(--c-ink);margin-top:0;font-size:26px;}
.tem-card h3{font-family:var(--font-head);color:var(--c-ink);}
.tem-muted{color:var(--c-muted);}

.tem-btn{display:inline-block;padding:12px 22px;border-radius:var(--radius-sm);border:none;font-weight:700;cursor:pointer;font-family:var(--font-body);font-size:15px;transition:.2s all;}
.tem-btn-primary{background:var(--gradient);color:#fff;box-shadow:var(--shadow-sm);}
.tem-btn-primary:hover{opacity:.92;transform:translateY(-1px);}
.tem-btn-accent{background:#fff;color:var(--c-accent);border:2px solid var(--c-accent);}
.tem-btn-accent:hover{background:var(--c-accent);color:#fff;}
.tem-btn-block{width:100%;}
.tem-btn:disabled{opacity:.45;cursor:not-allowed;}

.tem-alert{padding:12px 16px;border-radius:var(--radius-sm);margin-bottom:16px;font-weight:600;}
.tem-alert-success{background:#ecfdf3;color:var(--c-success);border:1px solid #b7ebc6;}
.tem-alert-error{background:#fef2f2;color:var(--c-accent-dark);border:1px solid #fecaca;}
.tem-alert-warn{background:#fffbeb;color:#92400e;border:1px solid #fde68a;}
.tem-notice{background:var(--c-surface);padding:16px;border-radius:var(--radius-sm);text-align:center;}

.tem-badge{display:inline-block;background:var(--c-surface);color:var(--c-text);padding:5px 12px;border-radius:20px;font-size:12px;font-weight:700;border:1px solid var(--c-line);}
.tem-badge-success{background:#ecfdf3;color:var(--c-success);border-color:#b7ebc6;}
.tem-badge-warn{background:#fffbeb;color:var(--c-warn);border-color:#fde68a;}

.tem-status{padding:4px 10px;border-radius:20px;font-size:12px;font-weight:700;}
.tem-status-pending{background:#fffbeb;color:var(--c-warn);}
.tem-status-approved{background:#ecfdf3;color:var(--c-success);}
.tem-status-rejected{background:#fef2f2;color:var(--c-accent-dark);}

/* ============ FORMS ============ */
.tem-form-title{font-family:var(--font-head);text-align:center;color:var(--c-ink);font-size:28px;margin-bottom:22px;}
.tem-grid-2{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-bottom:18px;}
.tem-field{display:flex;flex-direction:column;gap:6px;}
.tem-field-full{grid-column:1 / -1;}
.tem-field label{font-weight:700;font-size:13px;color:var(--c-ink);}
.tem-field input,.tem-field select,.tem-field textarea{
  padding:11px 14px;border:1px solid var(--c-line);border-radius:var(--radius-sm);
  font-family:var(--font-body);font-size:14px;background:var(--c-surface);color:var(--c-text);
}
.tem-field input:focus,.tem-field select:focus,.tem-field textarea:focus{outline:none;border-color:var(--c-primary);background:#fff;}
@media(max-width:680px){.tem-grid-2{grid-template-columns:1fr;}}

/* ============ DASHBOARD ============ */
.tem-dashboard{display:grid;grid-template-columns:260px 1fr;gap:24px;align-items:start;}
@media(max-width:820px){.tem-dashboard{grid-template-columns:1fr;}}

.tem-dash-sidebar{background:var(--c-bg);border:1px solid var(--c-line);border-radius:var(--radius);box-shadow:var(--shadow-sm);padding:24px;text-align:center;position:sticky;top:20px;}
.tem-dash-avatar{
	margin: auto;
	width:90px;height:90px;border-radius:50%;object-fit:cover;border:3px solid var(--c-primary);margin-bottom:10px;}
.tem-dash-user h3{margin:6px 0;font-size:18px;}
.tem-dash-nav{display:flex;flex-direction:column;gap:6px;margin-top:20px;text-align:left;}
.tem-dash-nav a{padding:11px 14px;border-radius:var(--radius-sm);text-decoration:none;color:var(--c-text);font-weight:600;font-size:14px;}
.tem-dash-nav a:hover{background:var(--c-surface);}
.tem-dash-nav a.active{background:var(--gradient);color:#fff;}
.tem-dash-nav a.tem-locked{color:var(--c-muted);cursor:not-allowed;opacity:.6;}
.tem-dash-nav a.tem-logout{color:var(--c-accent);margin-top:10px;border-top:1px solid var(--c-line);padding-top:14px;}

/* ============ TABLES ============ */
.tem-table-wrap{overflow-x:auto;}
.tem-table{width:100%;border-collapse:collapse;font-size:14px;}
.tem-table th{background:var(--c-surface);color:var(--c-ink);text-align:left;padding:10px 14px;font-weight:700;border-bottom:2px solid var(--c-line);}
.tem-table td{padding:10px 14px;border-bottom:1px solid var(--c-line);}
.tem-table tr:hover td{background:var(--c-surface);}

/* ============ ATTENDANCE BOX ============ */
.tem-attendance-box{display:flex;justify-content:space-between;align-items:center;background:var(--c-surface);padding:20px;border-radius:var(--radius-sm);flex-wrap:wrap;gap:14px;}
.tem-attendance-actions{display:flex;gap:10px;}
#tem-att-msg{margin-top:10px;font-weight:700;}

/* ============ ID CARD ============ */
.tem-idcard{width:340px;margin:0 auto;border-radius:16px;overflow:hidden;box-shadow:var(--shadow-lg);border:1px solid var(--c-line);}
.tem-idcard-head{background:var(--gradient);color:#fff;text-align:center;padding:14px;font-family:var(--font-head);font-weight:700;font-size:16px;}
.tem-idcard-body{background:#fff;text-align:center;padding:22px;}
.tem-idcard-photo{
	margin: auto;
	width:110px;height:110px;border-radius:50%;object-fit:cover;border:4px solid var(--c-primary);margin-bottom:10px;}
.tem-idcard-body h3{margin:6px 0 2px;font-size:19px;}
.tem-idcard-code{color:var(--c-primary);font-weight:800;letter-spacing:1px;margin-bottom:14px;}
.tem-idcard-table{width:100%;text-align:left;font-size:13px;border-top:1px dashed var(--c-line);padding-top:12px;}
.tem-idcard-table td{padding:5px 0;}
.tem-idcard-table td:first-child{color:var(--c-muted);width:90px;font-weight:600;}
.tem-idcard-foot{background:var(--c-ink);color:#fff;text-align:center;font-size:11px;padding:8px;letter-spacing:.5px;}

@media print{
  body *{visibility:hidden;}
  #tem-idcard-print, #tem-idcard-print *{visibility:visible;}
  #tem-idcard-print{position:absolute;top:0;left:0;}
}

/* ============ ADMIN AREA — ENHANCED ============ */
.tem-admin-avatar{width:44px;height:44px;object-fit:cover;border-radius:50%;border:2px solid var(--c-line);box-shadow:var(--shadow-sm);}

/* Employee list table (edit.php?post_type=employee) */
.post-type-employee #posts-filter .wp-list-table{border:1px solid var(--c-line);border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow-sm);border-spacing:0;}
.post-type-employee .wp-list-table thead th{background:var(--c-surface);color:var(--c-ink);font-family:var(--font-body);font-weight:700;font-size:13px;padding:12px 10px;border-bottom:2px solid var(--c-line);}
.post-type-employee .wp-list-table tbody td{padding:14px 10px;vertical-align:middle;border-bottom:1px solid var(--c-line);}
.post-type-employee .wp-list-table tbody tr:hover{background:#fff8f3;}
.post-type-employee .wp-list-table tbody tr:last-child td{border-bottom:none;}
.post-type-employee .column-title strong a{color:var(--c-ink);font-weight:700;}
.post-type-employee .column-emp_code code{background:var(--c-surface);padding:3px 8px;border-radius:6px;font-size:12px;color:var(--c-primary-dark);font-weight:700;}

/* Status badges reused inside wp-admin */
.wp-list-table .tem-status,.tem-admin-wrap .tem-status{padding:5px 12px;border-radius:20px;font-size:11px;font-weight:800;letter-spacing:.3px;text-transform:uppercase;display:inline-block;}
.tem-status-pending{background:#fffbeb;color:#92400e;}
.tem-status-approved{background:#ecfdf3;color:var(--c-success);}
.tem-status-rejected{background:#fef2f2;color:var(--c-accent-dark);}

/* Filters row above the list table */
.post-type-employee .tablenav .actions select,
.post-type-employee .tablenav .actions input[type="text"]{
	border-radius:8px;border:1px solid var(--c-line);padding:5px 10px;margin-right:6px;
}

/* Row action links (Approve/Reject/Edit/Trash) */
.post-type-employee .row-actions{font-size:12px;}

/* Add New Employee / Meta Box styling */
.tem-metabox-section{background:#fff;border:1px solid var(--c-line);border-radius:var(--radius-sm);padding:18px 20px;margin-bottom:18px;box-shadow:var(--shadow-sm);}
.tem-metabox-heading{margin:0 0 12px;font-family:var(--font-head);font-size:16px;color:var(--c-ink);border-bottom:1px solid var(--c-line);padding-bottom:10px;}
.tem-metabox-section .form-table th{font-weight:600;color:var(--c-text);}
.tem-metabox-section input[type="text"],
.tem-metabox-section input[type="email"],
.tem-metabox-section input[type="password"],
.tem-metabox-section input[type="date"],
.tem-metabox-section select,
.tem-metabox-section textarea{
	border-radius:8px;border:1px solid var(--c-line);padding:8px 12px;background:var(--c-surface);
}
.tem-metabox-section input:focus,.tem-metabox-section select:focus,.tem-metabox-section textarea:focus{border-color:var(--c-primary);background:#fff;outline:none;}

.tem-status-select{font-weight:800;border-radius:20px !important;padding:6px 16px !important;border:none !important;cursor:pointer;}
.tem-status-select-pending{background:#fffbeb;color:#92400e;}
.tem-status-select-approved{background:#ecfdf3;color:var(--c-success);}
.tem-status-select-rejected{background:#fef2f2;color:var(--c-accent-dark);}

/* Admin submenu pages (Attendance / Leave / Export) */
.tem-admin-wrap{max-width:1200px;}
.tem-admin-wrap h1{font-family:var(--font-head);color:var(--c-ink);}
.tem-admin-wrap .widefat{border-radius:var(--radius);overflow:hidden;border:1px solid var(--c-line);box-shadow:var(--shadow-sm);}
.tem-admin-wrap .widefat thead th{background:var(--gradient);color:#fff;font-weight:700;padding:12px 14px;}
.tem-admin-wrap .widefat tbody td{padding:12px 14px;}
.tem-admin-wrap .widefat tbody tr:hover{background:var(--c-surface);}
.tem-admin-wrap .button-primary{background:var(--gradient);border:none;text-shadow:none;box-shadow:none;border-radius:8px;}
.tem-admin-wrap .button{border-radius:8px;}
