* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
    color: #fff;
}

/* Login Page */
.login-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    text-align: center;
}

.login-container h1 {
    margin-bottom: 30px;
    font-size: 28px;
}

.login-container input {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    margin-bottom: 15px;
    background: rgba(255,255,255,0.9);
}

.login-container button {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    background: #0066ff;
    color: #fff;
    cursor: pointer;
    transition: 0.3s;
}

.login-container button:hover {
    background: #0052cc;
}

.error {
    color: #ff6b6b;
    margin-top: 15px;
}

/* Main Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 30px;
}

header h1 {
    font-size: 24px;
}

.header-links {
    display: flex;
    gap: 10px;
    align-items: center;
}

.nav-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #0066ff, #00ccff);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    transition: 0.3s;
    font-weight: 500;
}

.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,102,255,0.3);
}

.logout-btn {
    padding: 10px 20px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    transition: 0.3s;
}

.logout-btn:hover {
    background: rgba(255,255,255,0.2);
}

/* Success message */
.success {
    background: rgba(46, 213, 115, 0.2);
    border: 1px solid #2ed573;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    color: #2ed573;
}

/* Generic btn */
.btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #0066ff, #00ccff);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: 0.3s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,102,255,0.3);
}

/* Messages */
.message {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.message.success {
    background: rgba(46, 213, 115, 0.2);
    border: 1px solid #2ed573;
}

.message.error {
    background: rgba(255, 107, 107, 0.2);
    border: 1px solid #ff6b6b;
}

/* Main Content */
.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

@media (max-width: 900px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

/* Cards */
.card {
    background: rgba(255,255,255,0.05);
    border-radius: 16px;
    padding: 25px;
    border: 1px solid rgba(255,255,255,0.1);
}

.card h2 {
    margin-bottom: 20px;
    font-size: 18px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* Form */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #a0a0a0;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    font-size: 14px;
    background: rgba(255,255,255,0.05);
    color: #fff;
    transition: 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #0066ff;
    background: rgba(255,255,255,0.1);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

.form-group.checkbox label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: #fff;
}

.form-group.checkbox input {
    width: auto;
}

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    background: linear-gradient(135deg, #0066ff, #00ccff);
    color: #fff;
    cursor: pointer;
    transition: 0.3s;
    font-weight: 600;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0,102,255,0.4);
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 4px;
    text-decoration: none;
    color: #fff;
    background: rgba(255,255,255,0.1);
    margin-right: 5px;
    display: inline-block;
}

.btn-small:hover {
    background: rgba(255,255,255,0.2);
}

.btn-danger {
    background: rgba(255, 107, 107, 0.3);
}

.btn-danger:hover {
    background: rgba(255, 107, 107, 0.5);
}

/* Table */
table {
    width: 100%;
    border-collapse: collapse;
}

table th,
table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

table th {
    color: #a0a0a0;
    font-weight: 500;
    font-size: 13px;
}

table td {
    font-size: 14px;
}

table tbody tr:hover {
    background: rgba(255,255,255,0.05);
}

.empty {
    text-align: center;
    color: #666;
    padding: 40px;
}

/* Footer */
footer {
    margin-top: 40px;
    padding: 20px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    color: #666;
    font-size: 13px;
}

footer code {
    background: rgba(255,255,255,0.1);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: monospace;
}

/* ========== WEB CONFIG PAGE ========== */

/* Page title */
.page-title {
    margin-bottom: 10px;
}

.page-subtitle {
    color: #a0a0a0;
    margin-bottom: 30px;
    font-size: 14px;
}

/* Add Form Card */
.add-form {
    background: rgba(255,255,255,0.05);
    padding: 25px;
    border-radius: 16px;
    margin-bottom: 30px;
    border: 1px solid rgba(255,255,255,0.1);
}

.add-form h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #00ccff;
    font-size: 18px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* Form Row Layout */
.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.form-row .field {
    flex: 1;
    min-width: 140px;
}

.form-row label {
    display: block;
    font-size: 12px;
    color: #a0a0a0;
    margin-bottom: 6px;
    font-weight: 500;
}

.form-row input,
.form-row select {
    width: 100%;
    padding: 10px 12px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    border-radius: 8px;
    font-size: 14px;
    transition: 0.3s;
}

.form-row input:focus,
.form-row select:focus {
    outline: none;
    border-color: #0066ff;
    background: rgba(255,255,255,0.1);
}

.form-row select option {
    background: #1a1a2e;
    color: #fff;
}

/* Config Table */
.config-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: rgba(255,255,255,0.02);
    border-radius: 12px;
    overflow: hidden;
}

.config-table th,
.config-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.config-table th {
    background: rgba(255,255,255,0.05);
    color: #00ccff;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.config-table td {
    font-size: 14px;
}

.config-table tbody tr:hover {
    background: rgba(255,255,255,0.05);
}

.config-table .extras {
    font-size: 11px;
    color: #666;
}

/* Action Buttons */
.btn-edit {
    background: linear-gradient(135deg, #0066ff, #00ccff);
    color: white;
    border: none;
    padding: 6px 14px;
    cursor: pointer;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    margin-right: 8px;
    transition: 0.3s;
}

.btn-edit:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0,102,255,0.3);
}

.btn-delete {
    background: rgba(255, 107, 107, 0.3);
    color: white;
    border: none;
    padding: 6px 14px;
    cursor: pointer;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    transition: 0.3s;
}

.btn-delete:hover {
    background: rgba(255, 107, 107, 0.5);
}

/* Section Title */
.section-title {
    color: #fff;
    font-size: 16px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title .count {
    background: rgba(0,204,255,0.2);
    color: #00ccff;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 13px;
}

/* Info Box */
.info-box {
    margin-top: 30px;
    padding: 20px;
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1);
}

.info-box h4 {
    color: #00ccff;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 16px;
}

.info-box ul {
    color: #a0a0a0;
    line-height: 2;
    padding-left: 20px;
}

.info-box code {
    background: rgba(0,102,255,0.2);
    color: #00ccff;
    padding: 3px 8px;
    border-radius: 4px;
    font-family: 'Consolas', monospace;
    font-size: 13px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 30px;
    border-radius: 16px;
    max-width: 600px;
    margin: 80px auto;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.modal-content h3 {
    color: #00ccff;
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 20px;
}

.modal-actions {
    margin-top: 25px;
    display: flex;
    gap: 10px;
}

.btn-secondary {
    padding: 10px 20px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: 0.3s;
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.2);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-state .icon {
    font-size: 48px;
    margin-bottom: 15px;
}

/* Responsive */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
    }
    
    .form-row .field {
        min-width: 100%;
    }
    
    .config-table {
        font-size: 12px;
    }
    
    .config-table th,
    .config-table td {
        padding: 8px 10px;
    }
    
    .header-links {
        flex-direction: column;
        gap: 5px;
    }
}
