/* === TPS Dispatch Dashboard — Minimal === */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    background: #0d1117;
    color: #c9d1d9;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.container {
    max-width: 420px;
    margin: 0 auto;
    padding: 40px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    justify-content: center;
}

/* Başlık */
.header {
    text-align: center;
    margin-bottom: 32px;
}

.header h1 {
    font-size: 20px;
    font-weight: 600;
    color: #f0f6fc;
    letter-spacing: 0.5px;
}

.header .badge {
    font-size: 12px;
    color: #c62828;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: 4px;
}

/* Input */
.input-group {
    width: 100%;
    margin-bottom: 16px;
}

.input-group label {
    display: block;
    font-size: 12px;
    color: #8b949e;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.input-group input {
    width: 100%;
    padding: 12px 16px;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    color: #f0f6fc;
    font-size: 16px;
    font-family: "SF Mono", "Menlo", monospace;
    outline: none;
    transition: border-color 0.2s;
}

.input-group input:focus {
    border-color: #c62828;
}

.input-group input::placeholder {
    color: #484f58;
}

/* Buton */
.btn-send {
    width: 100%;
    padding: 14px;
    background: #c62828;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: background 0.2s;
}

.btn-send:hover {
    background: #b71c1c;
}

.btn-send:active {
    background: #8e0000;
    transform: scale(0.98);
}

.btn-send:disabled {
    background: #30363d;
    color: #484f58;
    cursor: not-allowed;
}

/* Buton içi spinner */
.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #484f58;
    border-top-color: #c62828;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Durum mesajı */
#status {
    width: 100%;
    margin-top: 20px;
    padding: 14px;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    text-align: center;
    font-size: 13px;
    color: #8b949e;
    display: none;
    white-space: pre-line;
}

#status.visible {
    display: block;
}

#status.success {
    border-color: #238636;
    color: #3fb950;
}

#status.error {
    border-color: #c62828;
    color: #f85149;
}

/* İzle butonu (başarılı gönderim sonrası çıkar) */
.btn-watch {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 10px;
    background: #238636;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-watch:hover {
    background: #2ea043;
}

.btn-watch:active {
    background: #196c2e;
}

/* Son oturumlar */
#history {
    width: 100%;
    margin-top: 24px;
    font-size: 12px;
    color: #484f58;
}

#history h3 {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.history-item {
    padding: 8px 0;
    border-bottom: 1px solid #21262d;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.15s;
    border-radius: 4px;
    padding: 8px 6px;
}

.history-item:hover {
    background: rgba(255,255,255,0.03);
}

.history-item .phone {
    font-family: "SF Mono", "Menlo", monospace;
    color: #8b949e;
}

.history-item .status-ok {
    color: #3fb950;
}

.history-item .status-err {
    color: #f85149;
}

/* === Video Alanı === */
#video-area {
    width: 100%;
    margin-top: 16px;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
    border: 1px solid #30363d;
}

#video-area video {
    width: 100%;
    display: block;
    background: #000;
    min-height: 240px;
}

#video-status {
    padding: 8px 12px;
    font-size: 12px;
    text-align: center;
    background: #161b22;
    color: #d2991d;
}

#video-status.connected {
    color: #3fb950;
}

.btn-stop {
    width: 100%;
    padding: 10px;
    background: #c62828;
    color: #fff;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: background 0.2s;
}

.btn-stop:hover {
    background: #b71c1c;
}

.btn-stop:active {
    background: #8e0000;
}
