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

html, body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #f5f0ff 0%, #faf8ff 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 0;
    background: linear-gradient(135deg, #9F7AEA 0%, #a78bda 100%);
    border-radius: 10px;
    color: white;
    box-shadow: 0 4px 15px rgba(159, 122, 234, 0.2);
}

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

.subtitle {
    font-size: 1.1em;
    opacity: 0.95;
    font-weight: 300;
}

/* Main Content */
main {
    flex: 1;
    margin-bottom: 40px;
}

/* Forms */
.form {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 0.95em;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="date"],
.form-group input[type="password"],
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0d5f0;
    border-radius: 6px;
    font-size: 1em;
    transition: border-color 0.3s, box-shadow 0.3s;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #9F7AEA;
    box-shadow: 0 0 0 3px rgba(159, 122, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
}

.form-group.checkbox {
    display: flex;
    align-items: flex-start;
    margin-bottom: 25px;
}

.form-group.checkbox input[type="checkbox"] {
    width: auto;
    margin-right: 10px;
    margin-top: 5px;
    cursor: pointer;
    accent-color: #9F7AEA;
}

.form-group.checkbox label {
    margin-bottom: 0;
    font-weight: 500;
    cursor: pointer;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: none;
    font-size: 1em;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, #9F7AEA 0%, #8765d8 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(159, 122, 234, 0.3);
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
    border: 2px solid #e0d5f0;
}

.btn-secondary:hover {
    background: #e8e8e8;
    border-color: #9F7AEA;
}

.btn-block {
    width: 100%;
    display: block;
    margin-bottom: 10px;
}

.delete-btn {
    padding: 6px 12px;
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background 0.3s;
}

.delete-btn:hover {
    background: #ff5252;
}

/* Button Groups */
.button-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 30px;
}

@media (min-width: 600px) {
    .button-group {
        flex-direction: row;
        gap: 15px;
    }

    .button-group .btn {
        flex: 1;
    }
}

/* Messages */
.error-message {
    padding: 15px;
    background-color: #ffe0e0;
    border: 2px solid #ff6b6b;
    color: #d32f2f;
    border-radius: 6px;
    margin-bottom: 20px;
    font-weight: 500;
}

.success-message {
    padding: 15px;
    background-color: #e0ffe0;
    border: 2px solid #4caf50;
    color: #2e7d32;
    border-radius: 6px;
    margin-bottom: 20px;
    font-weight: 500;
}

/* Sections */
.welcome-section,
.login-section,
.info-section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

.welcome-section h2,
.login-section h2,
.info-section h3 {
    color: #9F7AEA;
    margin-bottom: 15px;
    font-size: 1.8em;
}

.info-section ul {
    list-style: none;
    padding-left: 0;
}

.info-section li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.info-section a {
    color: #9F7AEA;
    text-decoration: none;
    font-weight: 500;
}

.info-section a:hover {
    text-decoration: underline;
}

/* Success Box */
.success-box {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.success-icon {
    font-size: 3em;
    color: #4caf50;
    margin-bottom: 20px;
}

.success-box h2 {
    color: #9F7AEA;
    margin-bottom: 15px;
    font-size: 1.8em;
}

.success-box p {
    color: #666;
    margin-bottom: 30px;
    font-size: 1.05em;
}

.info-box {
    background: #f9f7ff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    text-align: left;
    border-left: 4px solid #9F7AEA;
}

.info-box h3 {
    color: #9F7AEA;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.info-box ol {
    margin-left: 20px;
    color: #666;
}

.info-box li {
    margin-bottom: 10px;
    line-height: 1.6;
}

/* Dashboard */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0d5f0;
}

.dashboard-header h2 {
    color: #9F7AEA;
    font-size: 1.8em;
}

.dashboard-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.dashboard-controls .btn {
    flex: 1;
    min-width: 150px;
}

@media (max-width: 600px) {
    .dashboard-controls {
        flex-direction: column;
    }

    .dashboard-controls .btn {
        width: 100%;
    }
}

/* Table */
.table-container {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    overflow-x: auto;
}

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

.checkins-table thead {
    background: linear-gradient(135deg, #9F7AEA 0%, #a78bda 100%);
    color: white;
}

.checkins-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.checkins-table td {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.checkins-table tbody tr:hover {
    background-color: #f9f7ff;
}

.checkins-table tbody tr:last-child td {
    border-bottom: none;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    color: #999;
    font-size: 0.9em;
    border-top: 1px solid #e0d5f0;
}

/* Responsive */
@media (max-width: 600px) {
    .container {
        padding: 15px;
    }

    header {
        margin-bottom: 30px;
        padding: 20px;
    }

    header h1 {
        font-size: 1.8em;
    }

    .subtitle {
        font-size: 0.95em;
    }

    .form,
    .welcome-section,
    .login-section,
    .info-section,
    .success-box {
        padding: 20px;
    }

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

    .btn {
        padding: 10px 20px;
        font-size: 0.95em;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .dashboard-header .btn {
        width: 100%;
    }

    .checkins-table {
        font-size: 0.9em;
    }

    .checkins-table th,
    .checkins-table td {
        padding: 10px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}
