* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

#app {
    width: 100%;
    min-height: 100vh;
}

.page {
    width: 100%;
    min-height: 100vh;
}

.login-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 40px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.login-container h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.btn-primary {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    padding: 10px 20px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s;
    margin-left: 10px;
}

.btn-secondary:hover {
    background: #5a6268;
}

.login-links {
    display: flex;
    justify-content: space-between;
}

.remember-me {
    margin-bottom: 15px !important;
}

.remember-me label {
    display: flex !important;
    align-items: center;
    cursor: pointer;
    font-weight: normal !important;
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    cursor: pointer;
}

.remember-me span {
    font-size: 14px;
    color: #666;
}

.btn-link {
    background: none;
    color: #667eea;
    border: none;
    font-size: 14px;
    cursor: pointer;
    text-decoration: underline;
    padding: 5px 10px;
}

.btn-link:hover {
    color: #764ba2;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    position: relative;
}

.modal-content .close {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
}

.modal-content .close:hover {
    color: #000;
}

.contact-phone {
    margin-top: 20px;
    font-size: 18px;
    color: #333;
}

.navbar {
    background: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar h2 {
    color: #333;
}

.nav-links {
    display: flex;
    gap: 10px;
}

.btn-nav {
    padding: 8px 20px;
    background: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-nav:hover {
    background: #e9ecef;
}

.btn-nav.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
}

.content {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

.section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.section h2 {
    color: #333;
    margin-bottom: 20px;
}

.section h3 {
    color: #555;
    margin: 20px 0 15px;
    font-size: 18px;
}

.section p {
    color: #666;
    line-height: 1.8;
    margin-bottom: 15px;
}

.user-card {
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 20px;
}

.user-avatar {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 50px;
}

.user-details p {
    margin: 10px 0;
    font-size: 18px;
}

.balance {
    font-size: 28px;
    font-weight: bold;
    color: #667eea;
}

.invite-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.invite-code-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 15px 0;
}

.invite-code {
    font-size: 24px;
    font-weight: bold;
    color: #667eea;
    letter-spacing: 2px;
}

.btn-copy {
    padding: 8px 16px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-copy:hover {
    background: #764ba2;
}

.qr-code-container {
    display: flex;
    justify-content: center;
    margin: 15px 0;
}

.qr-code-container img {
    border: 2px solid #ddd;
    border-radius: 8px;
}

.invite-tip {
    font-size: 14px;
    color: #999;
    text-align: center;
}

.parent-section {
    background: #fff;
    border: 1px solid #e0e0e0;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.parent-card {
    background: #f0f0f0;
    padding: 15px;
    border-radius: 8px;
}

.parent-card p {
    margin: 8px 0;
}

.children-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
}

.children-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: white;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 16px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.admin-table th,
.admin-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.admin-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.admin-table tbody tr:hover {
    background: #f8f9fa;
}

.btn-edit {
    padding: 8px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-edit:hover {
    transform: scale(1.05);
}

#edit-balance-form {
    margin-top: 20px;
}

#edit-balance-form .form-group {
    text-align: left;
}

#edit-balance-form .btn-primary {
    margin-top: 10px;
}

@media (max-width: 768px) {
    .login-container {
        margin: 50px 20px;
        padding: 30px 20px;
    }

    .navbar {
        flex-direction: column;
        gap: 15px;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .user-card {
        flex-direction: column;
        text-align: center;
    }

    .admin-table {
        font-size: 14px;
    }

    .admin-table th,
    .admin-table td {
        padding: 10px 5px;
    }

    .invite-code {
        font-size: 18px;
    }

    .children-summary {
        flex-direction: column;
        gap: 10px;
    }
}
