* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f3f6f9;
    color: #222;
}


/* =====================================================
   LOGIN
===================================================== */

.login-container {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: white;
    padding: 35px;
    border-radius: 14px;
    box-shadow: 0 8px 35px rgba(0,0,0,0.12);
}

.logo {
    width: 75px;
    height: 75px;
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #1677c8;
    color: white;
    font-weight: bold;
    font-size: 14px;
}

.login-card h1 {
    text-align: center;
    margin: 0;
}

.subtitle {
    text-align: center;
    color: #777;
    margin-bottom: 30px;
}

label {
    display: block;
    margin-top: 15px;
    margin-bottom: 6px;
    font-weight: bold;
}

input {
    width: 100%;
    padding: 13px;
    border: 1px solid #ccc;
    border-radius: 7px;
    font-size: 15px;
}

button {
    border: 0;
    cursor: pointer;
    border-radius: 7px;
    padding: 12px 18px;
    font-weight: bold;
}

.login-card button {
    width: 100%;
    margin-top: 22px;
    background: #1677c8;
    color: white;
}

.message {
    margin-top: 12px;
    text-align: center;
    color: #b00020;
}


/* =====================================================
   TOPBAR
===================================================== */

.topbar {
    background: #126bb2;
    color: white;
    min-height: 65px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 25px;
}

.small-button {
    background: white;
    color: #126bb2;
    padding: 8px 13px;
    margin-left: 12px;
}


/* =====================================================
   ADMIN
===================================================== */

.admin-container {
    display: grid;
    grid-template-columns: 390px 1fr;
    min-height: calc(100vh - 65px);
}

.staff-panel {
    background: white;
    border-right: 1px solid #ddd;
    padding: 18px;
    overflow-y: auto;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h2 {
    margin: 0;
}

.staff-row {
    border: 1px solid #ddd;
    border-radius: 9px;
    padding: 12px;
    margin-bottom: 10px;
}

.staff-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.staff-details span {
    color: #777;
    font-size: 13px;
}

.staff-actions {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.status {
    font-size: 12px;
    font-weight: bold;
}

.online {
    color: #0a9b44;
}

.offline {
    color: #888;
}

.monitor-button {
    background: #1677c8;
    color: white;
    padding: 7px 10px;
    font-size: 11px;
}

.monitor-button.disabled {
    background: #aaa;
}

.delete-button {
    background: #c62828;
    color: white;
    padding: 7px 10px;
    font-size: 11px;
}

.register-box {
    margin-top: 30px;
    border-top: 1px solid #ddd;
    padding-top: 20px;
}

.register-box h3 {
    margin-top: 0;
}

.register-box input {
    margin-bottom: 8px;
}

.register-box button {
    width: 100%;
    background: #178b4c;
    color: white;
}


/* =====================================================
   MONITOR
===================================================== */

.monitor-panel {
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.monitor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.monitor-header h2 {
    margin: 0 0 5px;
}

.monitor-header span {
    color: #666;
}

.danger-button {
    background: #c62828;
    color: white;
}

.video-container {
    position: relative;
    width: 100%;
    flex: 1;
    min-height: 500px;
    background: #111;
    border-radius: 12px;
    overflow: hidden;
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #111;
}

.video-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    color: white;
    font-size: 20px;
}

.video-placeholder div {
    font-size: 60px;
}

.monitor-controls {
    padding-top: 15px;
}

.control-button {
    background: #333;
    color: white;
}

.connection-info {
    padding-top: 10px;
    color: #666;
    font-size: 13px;
}


/* =====================================================
   STAFF PAGE
===================================================== */

.staff-page {
    min-height: calc(100vh - 65px);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.staff-card {
    width: 100%;
    max-width: 750px;
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    text-align: center;
}

.green-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    background: #10a651;
    border-radius: 50%;
    margin-right: 5px;
}

.online-indicator {
    color: #07883f;
    font-weight: bold;
}

.staff-card h1 {
    margin-bottom: 5px;
}

.camera-status {
    margin: 20px 0;
    padding: 12px;
    background: #f3f3f3;
    border-radius: 8px;
}

.camera-status.success {
    background: #e4f7ec;
    color: #087b3e;
}

.camera-status.error {
    background: #fde8e8;
    color: #a00;
}

#preview {
    width: 100%;
    max-height: 430px;
    background: #111;
    border-radius: 10px;
}

.monitor-notice {
    margin-top: 15px;
    padding: 14px;
    border-radius: 8px;
    background: #edf5fc;
    color: #17659a;
    font-weight: bold;
}

.privacy-note {
    margin-top: 15px;
    color: #777;
    font-size: 13px;
}


/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 850px) {

    .admin-container {
        grid-template-columns: 1fr;
    }

    .staff-panel {
        border-right: 0;
        border-bottom: 1px solid #ddd;
    }

    .video-container {
        min-height: 350px;
    }

}

@media (max-width: 500px) {

    .topbar {
        padding: 10px;
        font-size: 12px;
    }

    .staff-card {
        padding: 18px;
    }

}