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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; 
    background: #f8fafc; 
    color: #334155;
    line-height: 1.6;
    min-height: 100vh; 
    display: flex; 
    flex-direction: column;
    align-items: center; 
    padding: 40px 20px;
}

.container {
    background: #ffffff; 
    border-radius: 16px; 
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03); 
    width: 100%; 
    max-width: 1200px; 
    overflow: hidden;
}

.header {
    background: #ffffff; 
    color: #1e293b; 
    padding: 30px; 
    text-align: left;
    position: relative;
    border-bottom: 1px solid #e2e8f0;
}

.header h1 {
    font-size: 28px; 
    font-weight: 700; 
    letter-spacing: -0.5px; 
    margin-bottom: 10px;
}

.header p {
    font-size: 14px; 
    color: #64748b;
}

.content {
    padding: 24px; 
    overflow-x: auto;
}

.client-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.client-table th, .client-table td {
    border-bottom: 1px solid #e2e8f0;
    padding: 16px 20px;
    text-align: left;
    vertical-align: middle;
}

.client-table th {
    background-color: #f8fafc;
    color: #334155;
    font-weight: 600;
    font-size: 14px;
}

.client-table tr:hover {
    background-color: #f1f5f9;
}

.btn {
    padding: 12px 20px; 
    border: none; 
    border-radius: 12px; 
    cursor: pointer; 
    text-decoration: none; 
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
}

.btn-primary {
    background: #1e3a8a; color: white;
}

.btn-primary:hover {
    background: #1e40af;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(30, 58, 138, 0.15);
}

.btn-danger {
    background: #ef4444; color: white;
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(220, 38, 38, 0.15);
}

.btn-success {
    background: #10b981; color: white;
}

.btn-success:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(5, 150, 105, 0.15);
}

.btn-secondary {
    background: #f1f5f9; color: #475569;
}

.btn-secondary:hover {
    background: #e2e8f0; color: #1e293b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Modal Styles */
		.modal-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
			background: rgba(0,0,0,0.5); justify-content: center; align-items: center; z-index: 1000;
}

.modal {
    background: white; border-radius: 8px; width: 500px; max-width: 90%; padding: 20px;
			box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.modal h2 {
    margin-bottom: 15px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block; margin-bottom: 5px; font-weight: 500;
}

/* removed old form-group input style */

.form-group textarea {
    resize: vertical; height: 80px;
}

.modal-actions {
    display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px;
}

.status-box {
    display: flex; 
			gap: 20px; 
			padding: 25px; 
			border-radius: 10px; 
			margin-bottom: 25px; 
			align-items: center;
}

.status-box.logged-in {
    background: #e8f5e9; 
			border-left: 5px solid #4CAF50;
}

.status-box.logged-out {
    background: #f5f5f5; 
			border-left: 5px solid #999;
}

.status-icon {
    font-size: 48px; 
			font-weight: bold;
			min-width: 60px;
			text-align: center;
}

.status-box.logged-in .status-icon {
    color: #4CAF50;
}

.status-box.logged-out .status-icon {
    color: #999;
}

.status-info {
    flex: 1;
}

.status-info h2 {
    font-size: 22px; 
			margin-bottom: 10px; 
			color: #333;
}

.status-info p {
    margin: 5px 0; 
			color: #666; 
			font-size: 14px;
}

.status-info p strong {
    color: #333;
}

.action-buttons {
    display: flex; 
			gap: 10px; 
			margin-bottom: 20px;
			flex-wrap: wrap;
}

.info-section {
    background: #f9f9f9; 
			padding: 20px; 
			border-radius: 8px; 
			margin-top: 15px;
}

.info-section h3 {
    margin-bottom: 15px; 
			color: #333; 
			font-size: 14px; 
			font-weight: 600;
			text-transform: uppercase;
			border-bottom: 1px solid #eaeaea;
			padding-bottom: 8px;
}

.info-item {
    display: flex; 
			justify-content: flex-start; 
			padding: 6px 0; 
			border-bottom: 1px dashed #eee;
			font-size: 13px;
}

.info-item:last-child {
    border-bottom: none;
}

.info-item-label {
    color: #666; 
			font-weight: 500;
			min-width: 140px;
			flex-shrink: 0;
}

.info-item-value {
    color: #333;
			font-family: ui-monospace, SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;
			word-break: break-all;
			text-align: left;
}

.footer {
    background: #f5f5f5; 
			padding: 15px 30px; 
			text-align: center; 
			color: #666; 
			font-size: 12px;
			border-top: 1px solid #eee;
}

.footer a {
    color: #667eea; 
			text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

.debug-details {
    background: #fdfdfd;
			border-top: 1px solid #eee;
			padding: 15px 30px;
			font-size: 13px;
}

.debug-details summary {
    cursor: pointer;
			color: #888;
			font-weight: 500;
			outline: none;
			user-select: none;
			text-align: center;
}

.debug-details summary:hover {
    color: #555;
}

.debug-details .info-section {
    margin-top: 15px;
			background: #f4f4f4;
			border: 1px solid #eaeaea;
}

.card {
    background: #ffffff; 
    border-radius: 16px; 
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03); 
    width: 100%; 
    max-width: 480px; 
    overflow: hidden;
}

.card .header {
    background: none; 
    color: #1e293b; 
    padding: 32px 32px 16px 32px; 
    text-align: center;
    border-bottom: none;
}

.card .header h1 {
    font-size: 26px; 
    font-weight: 700; 
    letter-spacing: -0.5px; 
    margin-bottom: 8px;
    color: #1e293b;
}

.card .header p {
    font-size: 15px; 
    color: #64748b;
}

.card .content {
    padding: 0 32px 32px 32px;
}

label {
    display:block; font-size:13px; color:#555; margin-bottom:6px
}

input[type="text"], input[type="password"], .form-group input, .form-group textarea {
    width:100%; padding:12px 16px; border:1px solid #cbd5e1; border-radius:12px; font-size:15px; outline:none; transition:box-shadow .2s ease, transform .2s ease; background: #f8fafc; color: #1e293b;
}

input:focus, textarea:focus {
    background: #ffffff;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

.muted {
    font-size:12px;color:#888;margin-top:12px;text-align:center
}

.confirm-box {
    border: 1px solid #ccc; padding: 30px; border-radius: 5px;
}

.app-info {
    margin-bottom: 10px; padding: 10px; background: #f7f7f7; border-left: 4px solid #2196F3;
}

.permission {
    padding: 10px; margin: 5px 0; background: #f5f5f5; border-left: 4px solid #4CAF50;
}

.buttons {
    margin-top: 20px; display: flex; gap: 10px;
}

button {
    flex: 1; padding: 14px; border: none; cursor: pointer; border-radius: 12px; font-size: 15px; font-weight: 600; transition: all 0.2s ease;
}

.allow {
    background: #1e3a8a; color: white;
}

.allow:hover {
    background: #1e40af; transform: translateY(-2px); box-shadow: 0 8px 16px rgba(30, 58, 138, 0.15);
}

.deny {
    background: #ef4444; color: white;
}

.deny:hover {
    background: #dc2626; transform: translateY(-2px); box-shadow: 0 8px 16px rgba(220, 38, 38, 0.15);
}

.content p {
    font-size: 16px; color: #333; margin-bottom: 25px;
}

.btn:hover {
    background: #5568d3;
}

.user-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.user-table th, .user-table td {
    border-bottom: 1px solid #e2e8f0;
    padding: 16px 20px;
    text-align: left;
    vertical-align: middle;
}

.user-table th {
    background-color: #f8fafc;
    color: #334155;
    font-weight: 600;
    font-size: 14px;
}

.user-table tr:hover {
    background-color: #f1f5f9;
}

/* --- Modern Login Split Layout --- */
.login-split-container {
    display: flex;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background: white;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1000;
}

.login-brand-side {
    flex: 1;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px;
    position: relative;
    overflow: hidden;
}

.login-brand-side::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.03) 10%, transparent 10%), radial-gradient(circle, rgba(255,255,255,0.03) 10%, transparent 10%);
    background-size: 40px 40px;
    background-position: 0 0, 20px 20px;
    opacity: 0.6;
    animation: drift 60s linear infinite;
}

@keyframes drift {
    from { transform: translateY(0) translateX(0); }
    to { transform: translateY(-40px) translateX(-40px); }
}

.brand-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 480px;
}

.brand-content h1 {
    font-size: 42px;
    margin-bottom: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.brand-content p {
    font-size: 18px;
    line-height: 1.6;
    opacity: 0.8;
}

.login-form-side {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #ffffff;
    padding: 40px;
}

.login-card-modern {
    width: 100%;
    max-width: 420px;
    padding: 40px;
}

.login-card-modern .header {
    background: none;
    color: #1e293b;
    padding: 0 0 40px 0;
    text-align: left;
}

.login-card-modern .header h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.login-card-modern .header p {
    font-size: 16px;
    color: #64748b;
}

.login-card-modern .form-group {
    margin-bottom: 24px;
}

.login-card-modern label {
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 10px;
    display: block;
}

.login-card-modern input[type="text"], 
.login-card-modern input[type="password"] {
    width: 100%;
    padding: 16px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    font-size: 16px;
    color: #1e293b;
    background: #f8fafc;
    transition: all 0.2s ease;
}

.login-card-modern input:focus {
    background: #ffffff;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    outline: none;
}

.login-card-modern .btn-primary {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    background: #1e3a8a;
    color: white;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 16px;
}

.login-card-modern .btn-primary:hover {
    background: #1e40af;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(30, 58, 138, 0.15);
}

.login-card-modern .muted {
    font-size: 14px;
    color: #94a3b8;
    margin-top: 32px;
    text-align: center;
}

.login-error-msg {
    color: #b91c1c;
    background: #fef2f2;
    border: 1px solid #fecaca;
    padding: 16px;
    border-radius: 12px;
    font-size: 14px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
}

@media (max-width: 768px) {
    .login-split-container {
        flex-direction: column;
    }
    .login-brand-side {
        flex: 0.3;
        padding: 40px 20px;
        min-height: 250px;
    }
    .brand-content h1 {
        font-size: 28px;
    }
    .brand-content p {
        font-size: 15px;
    }
    .login-form-side {
        flex: 0.7;
        align-items: flex-start;
        padding-top: 40px;
        border-radius: 24px 24px 0 0;
        margin-top: -24px;
        z-index: 2;
    }
    .login-card-modern {
        padding: 20px;
    }
}