/**
 * Main Stylesheet - PHP User Registration
 * Developer: Molla Samser | RSK World - https://rskworld.in
 * Contact: help@rskworld.in | +91 93305 39277
 * Year: 2026
 */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #64748b;
    --success: #059669;
    --error: #dc2626;
    --warning: #d97706;
    --bg: #f8fafc;
    --card-bg: #fff;
    --text: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --radius: 10px;
    --shadow: 0 4px 14px rgba(0,0,0,0.08);
    --font: 'Segoe UI', system-ui, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* Header */
.site-header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 0;
    box-shadow: var(--shadow);
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    font-size: 1.15rem;
}

.logo span {
    color: var(--primary);
    font-weight: 600;
}

.site-header nav a {
    margin-left: 1.25rem;
    color: var(--secondary);
    text-decoration: none;
    font-weight: 500;
}

.site-header nav a:hover {
    color: var(--primary);
}

/* Main */
.main-content {
    flex: 1;
    padding: 2rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Auth cards */
.auth-card,
.dashboard-card,
.verify-card {
    width: 100%;
    max-width: 420px;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2rem;
    border: 1px solid var(--border);
}

.auth-card h1,
.dashboard-card h1 {
    margin: 0 0 0.25rem;
    font-size: 1.5rem;
    color: var(--text);
}

.auth-card h1 i,
.dashboard-card h1 i {
    margin-right: 0.4rem;
    color: var(--primary);
}

.subtitle {
    margin: 0 0 1.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.subtitle a {
    color: var(--primary);
    text-decoration: none;
}

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

/* Forms */
.auth-form .form-group {
    margin-bottom: 1.1rem;
}

.auth-form label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
}

.auth-form input {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.auth-form .btn {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.75rem;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    border-radius: 6px;
    font-weight: 600;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--secondary);
    color: #fff;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

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

.btn-sm {
    padding: 0.4rem 0.85rem;
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.form-group-inline {
    margin-bottom: 0.75rem;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: normal;
    cursor: pointer;
}

.profile-card {
    max-width: 480px;
}

.profile-section {
    margin-bottom: 1.75rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.profile-section:last-of-type {
    border-bottom: none;
}

.profile-section h2 {
    font-size: 1rem;
    margin: 0 0 0.75rem;
    color: var(--text-muted);
}

.auth-footer {
    margin-top: 1.25rem;
    text-align: center;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

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

/* Alerts */
.alert {
    padding: 0.85rem 1rem;
    border-radius: 6px;
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

/* Dashboard */
.user-info {
    background: var(--bg);
    padding: 1.25rem;
    border-radius: 6px;
    margin-bottom: 1.25rem;
}

.user-info p {
    margin: 0.5rem 0;
}

.verify-card .btn {
    margin-top: 0.5rem;
}

/* Landing */
.landing {
    text-align: center;
    max-width: 520px;
}

.landing h1 {
    font-size: 1.85rem;
    margin: 0 0 0.5rem;
    color: var(--text);
}

.landing .text-primary {
    color: var(--primary);
}

.landing .tagline {
    color: var(--text-muted);
    margin: 0 0 0.5rem;
}

.landing .credit {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0 0 1.5rem;
}

.landing .credit a {
    color: var(--primary);
    text-decoration: none;
}

.landing-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.landing-actions .btn {
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    font-weight: 600;
    border-radius: 6px;
    display: inline-block;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
    display: inline-block;
}

.feature-list li {
    padding: 0.35rem 0;
    color: var(--text-muted);
}

.feature-list li i {
    color: var(--success);
    margin-right: 0.5rem;
}

/* Footer */
.site-footer {
    background: var(--card-bg);
    border-top: 1px solid var(--border);
    padding: 1rem 0;
    margin-top: auto;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.site-footer a {
    color: var(--primary);
    text-decoration: none;
}

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

/* Static / content pages */
.page-content {
    max-width: 720px;
    margin: 0 auto;
    padding: 1rem 0;
}

.page-content h1 {
    font-size: 1.5rem;
    margin: 0 0 0.25rem;
}

.static-content h2 {
    font-size: 1.1rem;
    margin: 1.25rem 0 0.5rem;
}

.static-content p {
    margin: 0.5rem 0;
}

/* 404 */
.page-404 {
    text-align: center;
}

.page-404 p { margin: 0.5rem 0; }

.page-404 .btn { margin: 0 0.25rem; }

/* Contact form textarea */
.auth-form textarea {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
}

.auth-form textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.text-danger { color: var(--error); }

/* Admin */
.admin-content { max-width: 980px; }

.admin-cards {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.admin-card {
    display: block;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem 2rem;
    text-decoration: none;
    color: var(--text);
    min-width: 140px;
    text-align: center;
}

.admin-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.admin-card-number {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
}

.admin-card-label { font-size: 0.9rem; color: var(--text-muted); }

.admin-card-warning .admin-card-number { color: var(--warning); }
.admin-card-warning { border-color: #fde68a; }

.admin-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 1rem;
}

.search-form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.search-form input[type="search"] {
    padding: 0.4rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    min-width: 180px;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin: 1rem 0;
    font-size: 0.95rem;
}

.pagination a {
    color: var(--primary);
    text-decoration: none;
}

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

.pagination-info { color: var(--text-muted); }

.table-wrap { overflow-x: auto; margin-bottom: 1rem; }

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.admin-table th,
.admin-table td {
    padding: 0.5rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.admin-table th {
    background: var(--bg);
    font-weight: 600;
}

.admin-table .message-row td {
    font-size: 0.85rem;
    color: var(--text-muted);
    padding: 0.25rem 0.75rem 1rem;
}

.badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

.badge-success { background: #d1fae5; color: #065f46; }

.badge-warning { background: #fef3c7; color: #92400e; }

.badge-primary { background: #dbeafe; color: #1d4ed8; }

.badge-danger { background: #fee2e2; color: #991b1b; }

.badge-info { background: #cffafe; color: #0e7490; }

.role-form { display: inline-block; margin-top: 0.25rem; }
.role-form select { font-size: 0.85rem; padding: 0.2rem 0.4rem; }

.avatar { border-radius: 50%; object-fit: cover; vertical-align: middle; }
.avatar-lg { width: 80px; height: 80px; }
.avatar-dashboard { margin-right: 0.5rem; }
.avatar-thumb { border-radius: 50%; object-fit: cover; }
.text-muted { color: var(--text-muted); }

.actions-cell { white-space: nowrap; }
.actions-cell form { display: inline; margin-right: 0.25rem; }

.btn-link {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-size: inherit;
    text-decoration: underline;
    padding: 0;
}

.btn-link:hover { color: var(--primary-dark); }

/* Password strength */
.password-strength {
    display: block;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.password-strength.strength-weak { color: var(--error); }
.password-strength.strength-medium { color: var(--warning); }
.password-strength.strength-strong { color: var(--success); }

/* Demo credentials */
.demo-credentials,
.demo-box {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
}

.demo-credentials strong,
.demo-box strong {
    display: block;
    margin-bottom: 0.5rem;
    color: #065f46;
}

.demo-row { margin: 0.35rem 0; }
.demo-row code,
.demo-box code {
    background: rgba(0,0,0,0.06);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.95em;
}

.demo-box p { margin: 0.5rem 0; }

.demo-boxes {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.demo-boxes .demo-box {
    flex: 1;
    min-width: 260px;
    max-width: 380px;
}

.demo-admin-box {
    border-color: #93c5fd;
    background: #eff6ff;
}

.demo-admin-box strong { color: #1d4ed8; }

.demo-superadmin-box {
    border-color: #fecaca;
    background: #fef2f2;
}

.demo-superadmin-box strong { color: #b91c1c; }

.btn-demo {
    margin-top: 0.5rem;
    background: #059669;
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 0.95rem;
}

.btn-demo:hover {
    background: #047857;
    color: #fff;
}

.demo-credentials .btn-demo { margin-top: 0.75rem; }
