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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f5f7;
    color: #1d1d1f;
    min-height: 100vh;
}

/* Auth pages (login/register) */
body.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    padding: 48px 40px;
    background: #ffffff;
    border: 1px solid #e5e5e7;
    border-radius: 18px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.06);
}

.auth-logo {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo h1 {
    font-size: 22px;
    font-weight: 600;
    color: #1d1d1f;
    letter-spacing: -0.3px;
}

.auth-logo p {
    font-size: 14px;
    color: #6e6e73;
    margin-top: 4px;
}

.auth-card h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 24px;
    color: #1d1d1f;
}

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

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #3a3a3c;
    margin-bottom: 6px;
}

.form-group input {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid #d2d2d7;
    border-radius: 10px;
    font-size: 15px;
    color: #1d1d1f;
    background: #fff;
    transition: border-color 0.15s;
    outline: none;
}

.form-group input:focus {
    border-color: #0071e3;
    box-shadow: 0 0 0 3px rgba(0,113,227,0.15);
}

.btn-primary {
    width: 100%;
    padding: 12px;
    background: #0071e3;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 8px;
    transition: background 0.15s;
}

.btn-primary:hover { background: #0077ed; }

.btn-secondary {
    padding: 8px 16px;
    background: #f5f5f7;
    color: #1d1d1f;
    border: 1px solid #d2d2d7;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background 0.15s;
}

.btn-secondary:hover { background: #e8e8ed; }

.btn-danger {
    padding: 8px 16px;
    background: #ff3b30;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn-success {
    padding: 8px 16px;
    background: #34c759;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: #6e6e73;
}

.auth-footer a { color: #0071e3; text-decoration: none; }
.auth-footer a:hover { text-decoration: underline; }

.alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-error { background: #fff2f0; color: #c0392b; border: 1px solid #ffcdd2; }
.alert-success { background: #f0fff4; color: #1a7a40; border: 1px solid #c3e6cb; }
.alert-info { background: #f0f6ff; color: #1a4a8a; border: 1px solid #c3d9ff; }

/* Main layout */
.topbar {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid #e5e5e7;
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0 24px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.topbar-brand {
    font-size: 16px;
    font-weight: 600;
    color: #1d1d1f;
    text-decoration: none;
}

.topbar-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.topbar-nav a {
    font-size: 14px;
    color: #3a3a3c;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 8px;
    transition: background 0.15s;
}

.topbar-nav a:hover { background: #f5f5f7; }

.topbar-user {
    font-size: 13px;
    color: #6e6e73;
}

/* Main content */
.main-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 24px;
}

.page-title {
    font-size: 28px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 8px;
}

.page-subtitle {
    font-size: 15px;
    color: #6e6e73;
    margin-bottom: 36px;
}

/* Service grid */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 48px;
}

.service-card {
    background: #ffffff;
    border: 1px solid #e5e5e7;
    border-radius: 16px;
    padding: 28px 24px;
    text-decoration: none;
    color: #1d1d1f;
    transition: box-shadow 0.2s, transform 0.2s;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.service-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.10);
    transform: translateY(-2px);
}

.service-icon {
    font-size: 32px;
    line-height: 1;
}

.service-name {
    font-size: 17px;
    font-weight: 600;
}

.service-desc {
    font-size: 13px;
    color: #6e6e73;
    line-height: 1.5;
}

.service-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 20px;
    background: #f5f5f7;
    color: #3a3a3c;
    align-self: flex-start;
}

/* Admin table */
.admin-section {
    background: #ffffff;
    border: 1px solid #e5e5e7;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 32px;
}

.admin-section-header {
    padding: 20px 24px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
}

.badge-warning { background: #fff3cd; color: #856404; }
.badge-success { background: #d1f5e0; color: #1a7a40; }
.badge-danger  { background: #ffe0de; color: #c0392b; }

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 12px 24px;
    font-size: 12px;
    font-weight: 600;
    color: #6e6e73;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #fafafa;
    border-bottom: 1px solid #f0f0f0;
}

td {
    padding: 14px 24px;
    font-size: 14px;
    border-bottom: 1px solid #f5f5f7;
    vertical-align: middle;
}

tr:last-child td { border-bottom: none; }

.action-buttons { display: flex; gap: 8px; }

.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: #6e6e73;
    font-size: 14px;
}
