/* assets/css/y_index.css - vFinal (Pro License & Calendar) */

:root { --yellow: #F5C300; --dark: #000; --panel: #111; --border: #222; --danger: #ff4757; --success: #2ecc71; }
* { box-sizing: border-box; }
body { background-color: var(--dark); color: #fff; font-family: 'Segoe UI', sans-serif; margin: 0; height: 100vh; overflow: hidden; }

/* --- AUTH & DASHBOARD --- */
.unified-auth-body { display: flex; align-items: center; justify-content: center; height: 100vh; }
.auth-card { text-align: center; width: 340px; }
.pin-display { display: flex; justify-content: center; gap: 15px; margin-bottom: 30px; }
.pin-dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #333; transition: 0.3s; }
.pin-dot.filled { background: var(--yellow); border-color: var(--yellow); box-shadow: 0 0 15px var(--yellow); }
.keypad { display: grid; grid-template-columns: repeat(3, 80px); gap: 20px; justify-content: center; }
.key { width: 80px; height: 80px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 24px; cursor: pointer; transition: 0.1s; color: #fff; }
.key:active { background: var(--yellow); color: #000; }

.wrapper { display: flex; height: 100vh; overflow: hidden; }
.sidebar { width: 250px; background: #000; border-right: 1px solid var(--border); display: flex; flex-direction: column; flex-shrink: 0; }
.sidebar-title { padding: 40px 25px; font-weight: 900; color: var(--yellow); font-size: 18px; letter-spacing: 2px; }
.nav-item { display: flex; align-items: center; padding: 18px 25px; color: #777; text-decoration: none; font-weight: bold; border-left: 4px solid transparent; }
.nav-item i { margin-right: 12px; font-size: 22px; }
.nav-item:hover, .nav-item.active { background: rgba(245, 195, 0, 0.05); color: var(--yellow); border-left-color: var(--yellow); }
.logout-btn { margin-top: auto; color: var(--danger) !important; margin-bottom: 20px; }
.main-content { flex: 1; background: #050505; display: flex; flex-direction: column; padding: 15px; overflow: hidden; }

/* --- GRID --- */
.admin-grid-layout { display: grid; grid-template-columns: 1.2fr 1fr; grid-template-rows: 1fr 1fr; gap: 15px; flex: 1; overflow: hidden; grid-template-areas: "sol sag_ust" "sol sag_alt"; }
.panel-box { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.box-sol { grid-area: sol; } .box-sag-ust { grid-area: sag_ust; } .box-sag-alt { grid-area: sag_alt; }
.modern-table-header { display: flex; align-items: center; justify-content: space-between; background: rgba(255,255,255,0.03); padding: 15px 20px; font-weight: bold; color: var(--yellow); border-bottom: 1px solid var(--border); }
.table-scroll-area { flex: 1; overflow-y: auto; }

/* --- TABLES & DETAILS --- */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th { text-align: left; padding: 12px 15px; color: #555; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--panel); z-index: 5; font-size: 11px; }
tbody td { padding: 12px 15px; border-bottom: 1px solid #1a1a1a; color: #ccc; font-size: 13px; }
tr.active { background: rgba(245, 195, 0, 0.1); border-left: 3px solid var(--yellow); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 8px; }
.dot-green { background: var(--success); } .dot-red { background: var(--danger); } .dot-gray { background: #444; }

.sys-detail-container { flex: 1; display: flex; flex-direction: column; padding: 25px; gap: 20px; overflow-y: auto; }
.detail-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #1a1a1a; padding-bottom: 15px; }
.detail-logo-wrapper { width: 100px; height: 80px; background: #000; border: 1px solid #222; border-radius: 8px; display: flex; align-items: center; justify-content: center; padding: 5px; }
.detail-logo-wrapper img { max-width: 100%; max-height: 100%; object-fit: contain; }
.status-badge { padding: 6px 15px; border-radius: 6px; border: 1px solid #333; font-size: 10px; font-weight: bold; }
.detail-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.info-box { background: rgba(255,255,255,0.02); border: 1px solid #222; padding: 12px 18px; border-radius: 10px; }
.info-box.full-width { grid-column: span 2; }
.info-box label { font-size: 9px; color: var(--yellow); font-weight: 900; display: block; margin-bottom: 4px; text-transform: uppercase; opacity: 0.7; }
.info-box span { font-size: 14px; color: #fff; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.detail-actions-section { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 15px; margin-top: auto; padding-top: 15px; border-top: 1px solid #1a1a1a; }
.action-btn { padding: 12px; background: #222; border: 1px solid #333; border-radius: 12px; color: #fff; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 10px; font-weight: bold; height: 85px; transition: 0.2s; }
.action-btn:hover { background: #333; border-color: #555; }
.action-btn i { font-size: 28px; color: var(--yellow); }
.action-btn.btn-connect { background: var(--success) !important; color: #000 !important; }

.log-tabs { display: flex; background: #0a0a0a; border-bottom: 1px solid var(--border); }
.log-tab { flex: 1; text-align: center; padding: 10px; cursor: pointer; font-size: 11px; font-weight: bold; color: #666; transition: 0.2s; }
.log-tab:hover { color: #fff; }
.log-tab.active { color: var(--yellow); border-bottom: 2px solid var(--yellow); background: rgba(245, 195, 0, 0.05); }
#logTableBody tr:hover { background: rgba(255,255,255,0.03); }
.log-action-badge { display: inline-block; padding: 2px 6px; border-radius: 4px; background: #222; border: 1px solid #333; font-size: 10px; color: #ccc; }

/* --- CUSTOM CALENDAR --- */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; margin-bottom: 15px; }
.day-name { color: #666; font-size: 10px; font-weight: bold; margin-bottom: 5px; }
.cal-day { aspect-ratio: 1/1; display: flex; align-items: center; justify-content: center; border-radius: 4px; cursor: pointer; font-size: 12px; color: #fff; border: 1px solid transparent; background: #111; }
.cal-day:hover { background: rgba(255,255,255,0.1); }
.cal-day.today { border-color: var(--yellow); }
.cal-day.range-start, .cal-day.range-end { background: var(--yellow); color: #000; font-weight: bold; }
.cal-day.in-range { background: rgba(245, 195, 0, 0.2); }
.cal-day.other-month { opacity: 0.3; }

/* --- DURATION BUTTONS --- */
.duration-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-top: 10px; }
.dur-btn { background: #222; border: 1px solid #333; color: #ccc; padding: 8px; font-size: 11px; font-weight: bold; cursor: pointer; border-radius: 6px; transition: 0.2s; }
.dur-btn:hover { border-color: #555; color: #fff; }
.dur-btn.active { border-color: var(--yellow); color: var(--yellow); background: rgba(245, 195, 0, 0.1); }

/* --- MODALS --- */
.custom-modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.9); z-index: 20000; display: none; align-items: center; justify-content: center; backdrop-filter: blur(10px); }
.sys-modal-box { background: #161616; border: 1px solid #333; border-top: 4px solid var(--yellow); border-radius: 15px; width: 90%; max-width: 480px; padding: 25px; text-align: center; box-shadow: 0 40px 100px rgba(0,0,0,0.9); animation: modalPop 0.4s cubic-bezier(0.1, 0.7, 0.1, 1); color: #fff; display: flex; flex-direction: column; max-height: 90vh; }
.sys-modal-box.modal-large { max-width: 700px; width: 95%; }
@keyframes modalPop { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.app-btn { width: 100%; padding: 15px; border-radius: 10px; border: none; font-weight: 900; cursor: pointer; transition: 0.2s; font-size: 13px; text-transform: uppercase; }
.btn-yellow { background: var(--yellow); color: #000; }
.btn-dark { background: #222; color: #fff; border: 1px solid #333; }
.lic-type-btn { flex: 1; padding: 15px; background: #222; border: 1px solid #333; border-radius: 8px; cursor: pointer; font-weight: bold; transition: 0.2s; font-size: 12px; color: #888; }
.lic-type-btn.active { background: var(--yellow); color: #000; border-color: var(--yellow); }

.mod-check-group { background: #0a0a0a; border: 1px solid #222; border-radius: 12px; padding: 15px; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; text-align: left; margin-top: 15px; }
.mod-check-group label { color: #aaa; cursor: pointer; display: flex; align-items: center; gap: 8px; font-size: 12px; }
.mod-check-group input[type="checkbox"] { transform: scale(1.2); accent-color: var(--yellow); }

.user-item { display: flex; justify-content: space-between; align-items: center; padding: 15px; border-bottom: 1px solid #333; }
.user-item:last-child { border-bottom: none; }