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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #F5F5F7;
    color: #1D1D1F;
    line-height: 1.5;
}

.container {
    min-height: 100vh;
    padding: 20px;
}

.home-view {
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-center {
    max-width: 440px;
    width: 100%;
    background: white;
    border-radius: 18px;
    padding: 48px 40px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
    text-align: center;
}

.icon-box {
    width: 64px;
    height: 64px;
    background: #007AFF;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

h1 {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 17px;
    color: #86868B;
    margin-bottom: 32px;
}

input[type="text"],
input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid #D2D2D7;
    border-radius: 12px;
    font-size: 17px;
    outline: none;
    transition: border 0.2s;
}

input:focus {
    border-color: #007AFF;
}

input::placeholder {
    color: #86868B;
}

.btn-primary,
.btn-secondary,
.btn-success,
.btn-danger,
.btn-back,
.btn-delete {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-primary {
    background: #007AFF;
    color: white;
    margin-bottom: 16px;
}

.btn-secondary {
    background: transparent;
    color: #007AFF;
}

.btn-success {
    background: #34C759;
    color: white;
}

.btn-danger {
    background: #FF3B30;
    color: white;
}

.btn-back {
    background: white;
    color: #1D1D1F;
    border: 1px solid #D2D2D7;
    padding: 12px 24px;
    width: auto;
}

.btn-delete {
    background: #FF3B30;
    color: white;
    padding: 8px 16px;
    width: auto;
    font-size: 14px;
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-success:hover,
.btn-danger:hover,
.btn-back:hover,
.btn-delete:hover {
    opacity: 0.9;
}

.dashboard-view {
    display: none;
}

.dashboard-view.active {
    display: block;
}

.hidden {
    display: none !important;
}

.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.header h1 {
    font-size: 34px;
    font-weight: 700;
}

.card {
    background: white;
    border-radius: 18px;
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}

.card-header {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.card-header h2 {
    font-size: 22px;
    font-weight: 600;
    margin-left: 12px;
}

.current-user {
    font-size: 17px;
    color: #86868B;
    margin-bottom: 16px;
}

.highlight {
    color: #1D1D1F;
    font-weight: 600;
}

.button-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.button-group button {
    flex: 1;
    min-width: 150px;
}

.user-item,
.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #F5F5F7;
    border-radius: 12px;
    margin-bottom: 12px;
}

.user-item.current-turn {
    border: 2px solid #007AFF;
}

.user-name {
    font-size: 17px;
    font-weight: 500;
    color: #1D1D1F;
}

.user-email,
.history-date {
    font-size: 15px;
    color: #86868B;
    margin-top: 4px;
}

.history-title {
    font-size: 17px;
    font-weight: 500;
    color: #1D1D1F;
}

.user-status {
    display: flex;
    align-items: center;
    gap: 12px;
}

.badge {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

.badge-success {
    background: #34C759;
    color: white;
}

.badge-warning {
    background: #FF9500;
    color: white;
}

.badge-danger {
    background: #FF3B30;
    color: white;
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    z-index: 1000;
    font-size: 15px;
    font-weight: 500;
    animation: slideIn 0.3s ease;
}

.notification.success {
    background: #34C759;
    color: white;
}

.notification.error {
    background: #FF3B30;
    color: white;
}

.notification.warning {
    background: #FF9500;
    color: white;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: white;
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
    text-align: center;
}

.stat-card h3 {
    font-size: 36px;
    font-weight: 700;
    color: #007AFF;
    margin-bottom: 8px;
}

.stat-card p {
    font-size: 15px;
    color: #86868B;
}

.table-responsive {
    overflow-x: auto;
}

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

.admin-table thead {
    background: #F5F5F7;
}

.admin-table th,
.admin-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid #D2D2D7;
}

.admin-table th {
    font-weight: 600;
    font-size: 14px;
    color: #86868B;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-table td {
    font-size: 15px;
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .button-group button {
        width: 100%;
    }
    
    .user-item,
    .history-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .admin-table {
        font-size: 14px;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 12px 8px;
    }
}
