/* public/css/admin.css */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #1a1a2e; color: #e0e0e0; min-height: 100vh; }
a { color: #00d4ff; text-decoration: none; }

/* Layout */
.layout { display: flex; min-height: 100vh; }
.sidebar { width: 220px; background: #16213e; padding: 20px 0; position: fixed; top: 0; left: 0; bottom: 0; z-index: 10; }
.sidebar-logo { padding: 0 20px 20px; border-bottom: 1px solid #2a3a5e; margin-bottom: 10px; }
.sidebar-logo h1 { font-size: 18px; color: #00d4ff; }
.sidebar-logo p { font-size: 11px; color: #888; margin-top: 4px; }
.sidebar-nav { list-style: none; }
.sidebar-nav a { display: block; padding: 12px 20px; color: #aab; font-size: 14px; transition: background .2s; }
.sidebar-nav a:hover, .sidebar-nav a.active { background: #1a1a2e; color: #00d4ff; }
.sidebar-user { position: absolute; bottom: 0; left: 0; right: 0; padding: 15px 20px; border-top: 1px solid #2a3a5e; font-size: 13px; }
.sidebar-user .user-name { color: #ccc; }
.sidebar-user .btn-logout { color: #d9534f; font-size: 12px; cursor: pointer; float: right; }
.main { margin-left: 220px; flex: 1; padding: 20px; }
.main iframe { width: 100%; height: calc(100vh - 40px); border: none; background: #1a1a2e; }

/* Login */
.login-page { display: flex; align-items: center; justify-content: center; height: 100vh; }
.login-box { background: #16213e; padding: 40px; border-radius: 8px; width: 360px; }
.login-box h2 { text-align: center; margin-bottom: 30px; color: #00d4ff; }
.login-box input { width: 100%; padding: 10px 12px; margin-bottom: 16px; background: #1a1a2e; border: 1px solid #333; border-radius: 4px; color: #e0e0e0; font-size: 14px; }
.login-box input:focus { border-color: #00d4ff; outline: none; }
.login-box .btn { width: 100%; padding: 10px; background: #00d4ff; color: #1a1a2e; border: none; border-radius: 4px; font-size: 16px; font-weight: bold; cursor: pointer; }
.login-box .btn:hover { background: #00b8e0; }
.login-box .error { color: #d9534f; font-size: 13px; text-align: center; margin-top: 12px; }

/* Page header */
.page-header { margin-bottom: 20px; }
.page-header h2 { font-size: 20px; color: #ccc; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin-bottom: 24px; }
.card { background: #16213e; padding: 20px; border-radius: 8px; cursor: pointer; transition: transform .2s; }
.card:hover { transform: translateY(-2px); }
.card-label { font-size: 13px; color: #888; margin-bottom: 8px; }
.card-value { font-size: 32px; font-weight: bold; color: #00d4ff; }
.card-value.green { color: #5cb85c; }

/* Toolbar */
.toolbar { display: flex; gap: 12px; margin-bottom: 16px; align-items: center; flex-wrap: wrap; }
.toolbar input, .toolbar select { padding: 8px 12px; background: #16213e; border: 1px solid #333; border-radius: 4px; color: #e0e0e0; font-size: 13px; }
.toolbar input:focus, .toolbar select:focus { border-color: #00d4ff; outline: none; }
.toolbar .spacer { flex: 1; }
.btn { padding: 8px 16px; border: none; border-radius: 4px; cursor: pointer; font-size: 13px; }
.btn-primary { background: #5cb85c; color: #fff; }
.btn-primary:hover { background: #4cae4c; }
.btn-danger { background: #d9534f; color: #fff; }
.btn-danger:hover { background: #c9302c; }
.btn-secondary { background: #555; color: #fff; }
.btn-secondary:hover { background: #666; }

/* Table */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; padding: 10px 12px; background: #16213e; color: #888; font-weight: normal; border-bottom: 1px solid #2a3a5e; }
td { padding: 10px 12px; border-bottom: 1px solid #1e2a40; }
tr:hover td { background: #16213e; }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.status-dot.online { background: #5cb85c; }
.status-dot.offline { background: #999; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; }
.badge-active { background: #5cb85c33; color: #5cb85c; }
.badge-closed { background: #9993; color: #999; }

/* Modal */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.6); z-index: 100; align-items: center; justify-content: center; }
.modal-overlay.show { display: flex; }
.modal { background: #16213e; padding: 24px; border-radius: 8px; width: 420px; max-height: 80vh; overflow-y: auto; }
.modal h3 { margin-bottom: 16px; color: #ccc; font-size: 16px; }
.modal label { display: block; font-size: 13px; color: #888; margin-bottom: 4px; margin-top: 12px; }
.modal input, .modal select { width: 100%; padding: 8px 12px; background: #1a1a2e; border: 1px solid #333; border-radius: 4px; color: #e0e0e0; font-size: 13px; }
.modal-buttons { display: flex; gap: 8px; margin-top: 20px; justify-content: flex-end; }
.modal .error { color: #d9534f; font-size: 12px; margin-top: 8px; }

/* Pagination */
.pagination { display: flex; gap: 8px; align-items: center; margin-top: 16px; font-size: 13px; }
.pagination span { color: #888; }

/* Upload area */
.upload-area { border: 2px dashed #333; border-radius: 8px; padding: 30px; text-align: center; margin-bottom: 16px; cursor: pointer; transition: border-color .2s; }
.upload-area:hover { border-color: #00d4ff; }
.upload-area.dragover { border-color: #5cb85c; background: #16213e; }
.upload-area input[type="file"] { display: none; }

/* Toast */
.toast { position: fixed; top: 20px; right: 20px; padding: 12px 20px; border-radius: 4px; color: #fff; font-size: 13px; z-index: 200; animation: slideIn .3s ease; }
.toast-success { background: #5cb85c; }
.toast-error { background: #d9534f; }
.toast-info { background: #00d4ff; color: #1a1a2e; }
@keyframes slideIn { from { transform: translateX(100px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* Auto-refresh indicator */
.auto-refresh { font-size: 11px; color: #888; margin-left: 12px; }
.auto-refresh.on { color: #5cb85c; }
.btn-refresh { background: #555; color: #fff; padding: 6px 10px; border: none; border-radius: 4px; cursor: pointer; font-size: 12px; }
.btn-refresh:hover { background: #666; }
.btn-group { display: flex; gap: 6px; align-items: center; }
.btn-group .btn { font-size: 12px; padding: 6px 12px; }
