/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
    --primary-color: #e65100;
    --primary-dark: #bf360c;
    --primary-light: #ff8a65;
    --secondary-color: #424242;
    --success-color: #2e7d32;
    --error-color: #c62828;
    --warning-color: #f57c00;
    --info-color: #0277bd;
    --background: #f5f5f5;
    --surface: #ffffff;
    --border: #e0e0e0;
    --text-primary: #212121;
    --text-secondary: #757575;
    --shadow: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 12px rgba(0,0,0,0.15);
}

/* ============================================
   GLOBAL STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
}

/* ============================================
   LOGIN PAGE
   ============================================ */
.login-page,
.register-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.login-card {
    background: var(--surface);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.login-header {
    background: var(--primary-color);
    color: white;
    padding: 40px 30px;
    text-align: center;
}

.login-header h1 {
    font-size: 32px;
    margin-bottom: 8px;
}

.login-header p {
    opacity: 0.9;
    font-size: 14px;
}

.login-form {
    padding: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(230, 81, 0, 0.1);
}

.password-toggle {
    position: relative;
    display: flex;
    align-items: center;
}

.password-toggle input {
    width: 100%;
    padding-right: 45px;
}

.password-toggle .password-toggle-btn {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    padding: 5px;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.password-toggle .password-toggle-btn:hover {
    opacity: 1;
}

.forgot-password {
    text-align: center;
    margin-top: 15px;
}

.forgot-password a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
}

.forgot-password a:hover {
    text-decoration: underline;
}

.login-footer {
    padding: 20px 30px;
    background: #fafafa;
    border-top: 1px solid var(--border);
}

.login-footer p {
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.login-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.login-footer a:hover {
    text-decoration: underline;
}

.demo-credentials {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ============================================
   REGISTER PAGE
   ============================================ */
.register-container {
    width: 100%;
    max-width: 700px;
    padding: 20px;
}

.register-card {
    background: var(--surface);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.register-header {
    background: var(--primary-color);
    color: white;
    padding: 30px;
    text-align: center;
}

.register-header h1 {
    font-size: 32px;
    margin-bottom: 8px;
}

.register-header p {
    opacity: 0.9;
    font-size: 14px;
}

.register-body {
    padding: 30px;
}

.register-form {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.form-section {
    border-bottom: 1px solid var(--border);
    padding-bottom: 25px;
}

.form-section:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}

.form-section h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.helper-text {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Role Selector */
.role-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.role-option {
    cursor: pointer;
}

.role-option input[type="radio"] {
    display: none;
}

.role-card {
    background: #f5f5f5;
    border: 2px solid var(--border);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s;
}

.role-option:hover .role-card {
    border-color: var(--primary-light);
    transform: translateY(-2px);
}

.role-option input[type="radio"]:checked + .role-card {
    border-color: var(--primary-color);
    background: #fff8e1;
    box-shadow: 0 0 0 3px rgba(230, 81, 0, 0.1);
}

.role-icon {
    font-size: 36px;
    margin-bottom: 10px;
}

.role-title {
    font-weight: 600;
    font-size: 16px;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.role-desc {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Password Field */
.password-field {
    position: relative;
    display: flex;
    align-items: center;
}

.password-field input {
    width: 100%;
    padding-right: 45px;
}

.password-toggle-btn {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    padding: 5px;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.password-toggle-btn:hover {
    opacity: 1;
}

.password-strength,
.password-match {
    font-size: 12px;
    margin-top: 4px;
    min-height: 16px;
    font-weight: 500;
}

.register-footer {
    padding: 20px 30px;
    background: #fafafa;
    border-top: 1px solid var(--border);
    text-align: center;
}

.register-footer p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 0;
}

.register-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.register-footer a:hover {
    text-decoration: underline;
}

select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.2s;
    background: white;
    cursor: pointer;
}

select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(230, 81, 0, 0.1);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #616161;
}

.btn-block {
    width: 100%;
    display: block;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover:not(:disabled) {
    background: #1b5e20;
}

.btn-success-outline {
    background: transparent;
    color: var(--success-color);
    border: 2px solid var(--success-color);
    cursor: default;
}

.btn-success-outline:disabled {
    opacity: 0.7;
}

.btn-warning {
    background: var(--warning-color);
    color: white;
}

.btn-warning:hover {
    background: #ef6c00;
}

.btn-large {
    padding: 14px 40px;
    font-size: 16px;
}

/* ============================================
   ALERTS
   ============================================ */
.alert {
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-success {
    background: #e8f5e9;
    color: var(--success-color);
    border: 1px solid #c8e6c9;
}

.alert-error {
    background: #ffebee;
    color: var(--error-color);
    border: 1px solid #ffcdd2;
}

/* ============================================
   CONTAINER & HEADER
   ============================================ */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    background: var(--surface);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.header h1 {
    font-size: 28px;
    color: var(--text-primary);
    margin: 0;
}

.header .user-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
}

.user-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.user-name {
    font-weight: 600;
    font-size: 16px;
}

.user-role {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.role-player {
    background: #e3f2fd;
    color: #1565c0;
}

.role-coach {
    background: #f3e5f5;
    color: #6a1b9a;
}

.role-admin {
    background: #fff3e0;
    color: #e65100;
}

.user-team-badge {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    background: #f5f5f5;
    color: var(--text-secondary);
}

.logout-btn {
    padding: 6px 14px;
    background: var(--error-color);
    color: white;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    transition: background 0.2s;
}

.logout-btn:hover {
    background: #b71c1c;
}

/* ============================================
   MAIN CONTENT LAYOUT
   ============================================ */
.main-content {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
}

/* ============================================
   WEEK NAVIGATION
   ============================================ */
.week-navigation {
    background: var(--surface);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.week-info {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.week-nav-buttons {
    display: flex;
    gap: 8px;
}

/* ============================================
   LEGEND
   ============================================ */
.legend {
    background: #fff8e1;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    display: flex;
    gap: 24px;
    align-items: center;
    flex-wrap: wrap;
    font-size: 14px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend-icon {
    font-size: 18px;
}

/* ============================================
   WEEK TABLE
   ============================================ */
.week-table-container {
    background: var(--surface);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow-x: auto;
}

.week-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
}

.week-table thead th {
    background: var(--primary-color);
    color: white;
    padding: 16px 12px;
    text-align: center;
    font-weight: 600;
    white-space: nowrap;
}

.week-table thead th:first-child {
    border-radius: 12px 0 0 0;
}

.week-table thead th:last-child {
    border-radius: 0 12px 0 0;
}

.day-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.day-name {
    font-size: 14px;
}

.day-number {
    font-size: 20px;
    font-weight: bold;
}

.week-table tbody th {
    background: #f5f5f5;
    padding: 16px 12px;
    text-align: center;
    font-weight: 500;
    font-size: 13px;
    line-height: 1.3;
    color: var(--text-secondary);
    white-space: nowrap;
}

.week-table tbody td {
    padding: 12px;
    border: 1px solid var(--border);
    vertical-align: top;
}

.week-table tbody td.today {
    background: #fff8e1;
}

.week-table thead th.today {
    background: var(--warning-color);
}

.no-training {
    text-align: center;
    color: var(--text-secondary);
    font-size: 18px;
}

/* ============================================
   TRAINING ITEM
   ============================================ */
.training-item {
    background: #ffffff;
    border: 2px solid var(--primary-light);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
}

.training-item:last-child {
    margin-bottom: 0;
}

.training-item.other-team {
    border-color: #e0e0e0;
    opacity: 0.7;
}

.training-team {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.badge-other {
    font-size: 11px;
    padding: 2px 8px;
    background: #f5f5f5;
    color: var(--text-secondary);
    border-radius: 10px;
    font-weight: 500;
}

.training-location {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 6px;
}

.training-location svg {
    width: 14px;
    height: 14px;
}

.training-description {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.training-note {
    font-size: 12px;
    background: #fff3e0;
    padding: 8px;
    border-radius: 6px;
    margin-bottom: 10px;
}

/* ============================================
   ATTENDANCE BUTTONS
   ============================================ */
.attendance-buttons-inline {
    display: flex;
    gap: 4px;
    margin-top: 10px;
}

.attendance-btn-mini {
    flex: 1;
    padding: 6px;
    border: 2px solid var(--border);
    border-radius: 6px;
    background: white;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
}

.attendance-btn-mini:hover {
    transform: scale(1.05);
}

.attendance-btn-mini.yes {
    border-color: #c8e6c9;
}

.attendance-btn-mini.yes.active {
    background: var(--success-color);
    color: white;
    border-color: var(--success-color);
}

.attendance-btn-mini.no {
    border-color: #ffcdd2;
}

.attendance-btn-mini.no.active {
    background: var(--error-color);
    color: white;
    border-color: var(--error-color);
}

.attendance-btn-mini.excused {
    border-color: #fff9c4;
}

.attendance-btn-mini.excused.active {
    background: var(--warning-color);
    color: white;
    border-color: var(--warning-color);
}

.attendance-btn-mini.note {
    border-color: #e1bee7;
}

.attendance-btn-mini.note:hover {
    background: #f3e5f5;
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.stats-card {
    background: var(--surface);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow);
}

.stats-card h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--text-primary);
}

/* ============================================
   ATTENDANCE CIRCLE
   ============================================ */
.attendance-circle {
    margin: 20px 0 30px;
    position: relative;
    width: 180px;
    height: 180px;
    margin-left: auto;
    margin-right: auto;
}

.circle-bg {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: conic-gradient(
        var(--success-color) 0% var(--percentage),
        #e0e0e0 var(--percentage) 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
}

.circle-inner {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.percentage-value {
    font-size: 36px;
    font-weight: bold;
    color: var(--success-color);
}

.percentage-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ============================================
   STAT ITEMS
   ============================================ */
.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-label {
    font-size: 14px;
    color: #ffffff;
}

.stat-value {
    font-size: 18px;
    font-weight: bold;
    color: var(--text-primary);
}

/* ============================================
   MODAL
   ============================================ */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-secondary);
    line-height: 1;
}

.modal-body {
    padding: 24px;
}

.modal-body textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
}

.modal-body textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* ============================================
   TRAINING LIST PAGE
   ============================================ */
.trainings-list {
    max-width: 800px;
    margin: 0 auto;
}

.date-separator {
    margin: 30px 0 15px;
}

.date-separator h3 {
    font-size: 18px;
    color: var(--text-secondary);
    font-weight: 600;
}

.training-card {
    background: var(--surface);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
    border: 2px solid transparent;
    transition: all 0.2s;
}

.training-card:hover {
    border-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.training-card.registered {
    border-color: var(--success-color);
    background: #f1f8f4;
}

.training-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.training-time {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.training-time svg {
    stroke-width: 2;
}

.training-status {
    flex-shrink: 0;
}

.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    display: inline-block;
}

.badge-success {
    background: #e8f5e9;
    color: var(--success-color);
}

.badge-danger {
    background: #ffebee;
    color: var(--error-color);
}

.badge-warning {
    background: #fff3e0;
    color: var(--warning-color);
}

.badge-neutral {
    background: #f5f5f5;
    color: var(--text-secondary);
}

.training-body {
    margin-bottom: 16px;
}

.training-body > div {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.training-body svg {
    flex-shrink: 0;
}

.training-participants strong {
    color: var(--primary-color);
}

.training-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.training-actions .btn {
    flex: 1;
    min-width: 120px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--surface);
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 24px;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.empty-state p {
    color: var(--text-secondary);
    font-size: 16px;
}

/* ============================================
   TEAM SELECTION
   ============================================ */
.team-selection {
    max-width: 900px;
    margin: 0 auto;
}

.team-select-form {
    margin-top: 30px;
}

.teams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.team-card-selectable {
    cursor: pointer;
    display: block;
}

.team-card-selectable input[type="radio"] {
    display: none;
}

.team-card-content {
    background: var(--surface);
    border: 3px solid var(--border);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s;
    box-shadow: var(--shadow);
}

.team-card-selectable:hover .team-card-content {
    border-color: var(--primary-light);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.team-card-selectable input[type="radio"]:checked + .team-card-content {
    border-color: var(--primary-color);
    background: #fff8e1;
    box-shadow: 0 0 0 3px rgba(230, 81, 0, 0.1);
}

.team-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.team-card-content h3 {
    font-size: 20px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.team-category {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

/* ============================================
   PROFILE PAGE
   ============================================ */
.profile-page {
    background: var(--background);
    min-height: 100vh;
    padding-bottom: 40px;
}

.profile-page .header {
    flex-direction: row;
    justify-content: space-between;
}

.header-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.profile-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 700px;
    margin: 0 auto;
}

.profile-card {
    background: var(--surface);
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow);
}

.profile-card h2 {
    font-size: 22px;
    margin-bottom: 25px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border);
}

.profile-card h3 {
    font-size: 18px;
    margin-top: 25px;
    margin-bottom: 20px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-form .form-group {
    margin-bottom: 20px;
}

.profile-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 0;
}

.profile-form .form-row .form-group {
    margin-bottom: 20px;
}

.profile-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 14px;
}

.profile-form input,
.profile-form select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.2s;
    font-family: inherit;
}

.profile-form input:focus,
.profile-form select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(230, 81, 0, 0.1);
}

.profile-form input:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
    color: var(--text-secondary);
}

.profile-form .helper-text {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 6px;
    display: block;
}

.profile-form .btn {
    margin-top: 10px;
    width: 100%;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.profile-stat-box {
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    border-radius: 10px;
    padding: 16px;
    text-align: center;
}

.profile-stat-box.primary {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%);
    color: white;
}

.profile-stat-label {
    font-size: 12px;
    opacity: 0.9;
    margin-bottom: 4px;
}

.profile-stat-value {
    font-size: 24px;
    font-weight: bold;
}

.profile-card:last-child {
    width: 100%;
}

.password-requirements {
    background: #f5f5f5;
    border-radius: 8px;
    padding: 12px 16px;
    margin: 15px 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.password-requirements ul {
    margin: 8px 0 0 0;
    padding-left: 20px;
}

.password-requirements li {
    margin: 4px 0;
}

/* Profile Header Section */
.profile-header-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: 12px;
    padding: 40px;
    margin-bottom: 30px;
    color: white;
    display: flex;
    align-items: center;
    gap: 30px;
    box-shadow: var(--shadow-lg);
}

.profile-photo-container {
    flex-shrink: 0;
}

.profile-photo-wrapper {
    position: relative;
    width: 150px;
    height: 150px;
}

.profile-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    font-weight: bold;
    color: white;
}

.profile-photo img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.photo-upload-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    background: white;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--primary-color);
    transition: all 0.2s;
}

.photo-upload-btn:hover {
    transform: scale(1.1);
    background: var(--primary-color);
    color: white;
}

.profile-header-info {
    flex: 1;
}

.profile-header-info h1 {
    font-size: 36px;
    margin-bottom: 10px;
    font-weight: 700;
}

.profile-meta {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.profile-meta-item {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.profile-meta-item.primary {
    background: rgba(255, 215, 0, 0.3);
    border: 2px solid rgba(255, 215, 0, 0.5);
}

.profile-stats-inline {
    display: flex;
    gap: 30px;
    margin-top: 20px;
}

.profile-stat-inline {
    display: flex;
    flex-direction: column;
}

.profile-stat-inline-value {
    font-size: 32px;
    font-weight: bold;
    line-height: 1;
}

.profile-stat-inline-label {
    font-size: 13px;
    opacity: 0.9;
    margin-top: 4px;
}

/* Multi-team selector styles */
.team-management-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
}

.team-selector-grid {
    display: grid;
    gap: 12px;
    margin-top: 15px;
}

.team-selector-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    transition: all 0.2s;
    cursor: pointer;
}

.team-selector-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.team-selector-item.selected {
    border-color: var(--primary-color);
    background: #e3f2fd;
}

.team-selector-checkbox {
    width: 22px;
    height: 22px;
    cursor: pointer;
    flex-shrink: 0;
}

.team-selector-info {
    flex: 1;
}

.team-selector-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 3px;
}

.team-selector-category {
    font-size: 13px;
    color: var(--text-secondary);
}

.team-jersey-input {
    width: 80px;
    padding: 6px 10px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    text-align: center;
    font-weight: 600;
}

.primary-team-badge {
    padding: 4px 12px;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #856404;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.primary-selector-row {
    display: none;
    margin-top: 15px;
    padding: 15px;
    background: #fff3e0;
    border-left: 4px solid #ff9800;
    border-radius: 6px;
}

.primary-selector-row.show {
    display: block;
}

.primary-selector-row label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #e65100;
}

.primary-selector-row select {
    width: 100%;
    padding: 10px;
    border: 2px solid #ffb74d;
    border-radius: 6px;
}

.teams-summary {
    display: none;
    margin-top: 15px;
    padding: 12px 15px;
    background: #e8f5e9;
    border-left: 4px solid #4caf50;
    border-radius: 6px;
}

.teams-summary.show {
    display: block;
}

/* Photo Modal */
.photo-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.photo-modal.show {
    display: flex;
}

.photo-modal-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
}

.photo-modal h3 {
    margin-bottom: 20px;
    font-size: 22px;
}

.photo-upload-area {
    border: 3px dashed var(--border);
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    margin-bottom: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.photo-upload-area:hover {
    border-color: var(--primary-color);
    background: #fff8e1;
}

.photo-upload-area.drag-over {
    border-color: var(--primary-color);
    background: #fff8e1;
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 10px;
    color: var(--text-secondary);
}

.photo-preview {
    display: none;
    margin-top: 20px;
}

.photo-preview img {
    max-width: 100%;
    border-radius: 8px;
    margin-bottom: 15px;
}

.photo-actions {
    display: flex;
    gap: 10px;
}

.photo-actions .btn {
    flex: 1;
}

/* My Teams Section */
.my-teams-card {
    grid-column: span 2;
}

.teams-description {
    color: var(--text-secondary);
    margin-bottom: 25px;
    font-size: 14px;
    line-height: 1.6;
}

.team-list-readonly {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.team-item-readonly {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.team-item-readonly::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-color);
    opacity: 0;
    transition: opacity 0.3s;
}

.team-item-readonly:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    border-color: var(--primary-color);
}

.team-item-readonly:hover::before {
    opacity: 1;
}

.team-item-readonly.primary {
    background: linear-gradient(135deg, #fff8e1 0%, #ffffff 100%);
    border: 2px solid #ffa726;
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.15);
}

.team-item-readonly.primary::before {
    background: linear-gradient(180deg, #ffd54f 0%, #ff9800 100%);
    width: 5px;
    opacity: 1;
}

.team-item-readonly.primary:hover {
    box-shadow: 0 8px 24px rgba(255, 152, 0, 0.25);
}

.team-item-icon {
    font-size: 40px;
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f5f5 0%, #eeeeee 100%);
    border-radius: 12px;
    transition: all 0.3s;
}

.team-item-readonly.primary .team-item-icon {
    background: linear-gradient(135deg, #ffe082 0%, #ffb74d 100%);
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3);
}

.team-item-readonly:hover .team-item-icon {
    transform: scale(1.1) rotate(5deg);
}

.team-item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.team-item-header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.team-item-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
}

.team-item-readonly.primary .team-item-name {
    color: #e65100;
}

.primary-badge-small {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #f57c00;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.primary-badge-small::before {
    content: '⭐ ';
}

.team-item-category {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
    line-height: 1.4;
}

.team-item-jersey {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.jersey-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 32px;
    padding: 0 12px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(230, 81, 0, 0.3);
}

.jersey-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.teams-info-box {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-left: 4px solid #1976d2;
    border-radius: 8px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: #0d47a1;
    line-height: 1.5;
}

.info-icon {
    font-size: 20px;
    flex-shrink: 0;
}

/* Multi-team header styles */
.user-teams-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.user-team-badge.primary {
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
    color: white;
    border-color: #1976d2;
    box-shadow: 0 2px 4px rgba(25, 118, 210, 0.3);
}

.user-team-badge .badge-icon {
    margin-right: 4px;
    font-size: 10px;
}

.teams-count {
    font-size: 11px;
    color: var(--text-secondary);
    margin-left: 4px;
    font-style: italic;
}

/* ============================================
   PLAYBOOK STYLES
   ============================================ */
.playbook-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 16px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.playbook-header h1 {
    margin: 0 0 8px 0;
    font-size: 32px;
}

.playbook-stats {
    display: flex;
    gap: 20px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.playbook-stat {
    background: rgba(255,255,255,0.2);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
}

.team-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.team-tab {
    padding: 12px 24px;
    border: 2px solid #E5E7EB;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    text-decoration: none;
    color: #374151;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.team-tab:hover {
    border-color: #667eea;
    transform: translateY(-2px);
}

.team-tab.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.filters-section {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.search-row {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.search-box {
    flex: 1;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 12px 12px 12px 40px;
    border: 2px solid #E5E7EB;
    border-radius: 8px;
    font-size: 14px;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9CA3AF;
}

.category-filter {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    border: 2px solid #E5E7EB;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    font-size: 14px;
}

.filter-btn:hover {
    border-color: #667eea;
}

.filter-btn.active {
    color: white;
    border-color: transparent;
}

.signals-list {
    display: grid;
    gap: 16px;
}

.signal-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.2s;
    border: 2px solid transparent;
}

.signal-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.signal-card.favorite {
    border-color: #FFD700;
    background: linear-gradient(135deg, #fffbf0 0%, #ffffff 100%);
}

.signal-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 12px;
}

.signal-category {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: white;
}

.signal-actions {
    display: flex;
    gap: 8px;
}

.favorite-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    transition: transform 0.2s;
}

.favorite-btn:hover {
    transform: scale(1.2);
}

.signal-media {
    margin: 16px 0;
    display: grid;
    gap: 16px;
}

.signal-photo {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s;
}

.signal-photo:hover {
    transform: scale(1.02);
}

.signal-video {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    background: #000;
}

.signal-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

.media-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: #e3f2fd;
    color: #1976d2;
    border-radius: 12px;
    font-size: 12px;
    margin-left: 8px;
    font-weight: 500;
}

.signal-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.tag {
    background: #F3F4F6;
    color: #6B7280;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
}

.signal-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #E5E7EB;
    font-size: 13px;
    color: #718096;
}

.file-input-wrapper {
    position: relative;
    margin-bottom: 8px;
}

.file-input-label {
    display: block;
    padding: 20px;
    background: #f3f4f6;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.file-input-label:hover {
    background: #e5e7eb;
    border-color: #667eea;
}

.file-input-label input[type="file"] {
    display: none;
}

.remove-photo-btn {
    padding: 6px 12px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
}

.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lightbox.show {
    display: flex;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 36px;
    cursor: pointer;
    background: rgba(0,0,0,0.7);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.lightbox-close:hover {
    background: rgba(255,255,255,0.2);
}

/* ============================================
   RESPONSIVE STYLES
   ============================================ */
@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media (max-width: 968px) {
    .profile-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .my-teams-card {
        grid-column: 1;
    }
    
    .team-list-readonly {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .week-navigation {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .week-nav-buttons {
        width: 100%;
        justify-content: space-between;
    }
    
    .legend {
        font-size: 12px;
        gap: 12px;
    }
    
    .day-name {
        font-size: 12px;
    }
    
    .day-number {
        font-size: 16px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .role-selector {
        grid-template-columns: 1fr;
    }

    .teams-grid {
        grid-template-columns: 1fr;
    }

    .register-body {
        padding: 20px;
    }

    .training-actions .btn {
        min-width: 100px;
        font-size: 13px;
    }
    
    .search-row {
        flex-direction: column;
    }
    
    .team-tabs {
        flex-direction: column;
    }
    
    .filter-btn {
        flex: 1;
    }
    
    .profile-header-section {
        flex-direction: column;
        text-align: center;
        padding: 30px 20px;
    }

    .profile-header-info h1 {
        font-size: 28px;
    }

    .profile-meta {
        justify-content: center;
    }

    .profile-stats-inline {
        justify-content: center;
    }

    .profile-photo-wrapper {
        width: 120px;
        height: 120px;
    }

    .profile-photo {
        width: 120px;
        height: 120px;
        font-size: 48px;
    }
    
    .user-teams-list {
        width: 100%;
        margin-top: 8px;
    }
    
    .user-team-badge {
        font-size: 11px;
        padding: 3px 8px;
    }
    
    .teams-count {
        width: 100%;
        margin-top: 4px;
        margin-left: 0;
    }
}

@media (max-width: 640px) {
    .profile-page .header {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-actions {
        width: 100%;
    }

    .header-actions .btn {
        flex: 1;
    }

    .profile-card {
        padding: 20px;
    }

    .profile-form .form-row {
        grid-template-columns: 1fr;
    }

    .profile-stats {
        grid-template-columns: 1fr;
    }
    
    .team-item-readonly {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    
    .team-item-icon {
        margin: 0 auto;
    }
    
    .team-item-content {
        align-items: center;
    }
    
    .team-item-header {
        justify-content: center;
        flex-direction: column;
    }
    
    .team-item-category,
    .team-item-jersey {
        justify-content: center;
    }
    
    .team-selector-item {
        flex-wrap: wrap;
    }
    
    .team-jersey-input {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .user-team-badge {
        flex: 1 1 calc(50% - 3px);
        justify-content: center;
        min-width: 0;
    }
}


/* Form options container for checkbox and forgot password link */
* Form options container for checkbox */
.form-options {
    margin-bottom: 20px;
}

/* Checkbox label styling */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    font-size: 14px;
    color: var(--text-primary);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    margin: 0;
    accent-color: var(--primary-color);
}

.checkbox-label span {
    font-weight: 400;
}

.checkbox-label:hover {
    color: var(--primary-color);
}



/* Checkbox label styling */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    font-size: 14px;
    color: var(--text-secondary);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    margin: 0;
    accent-color: var(--primary-color);
}

.checkbox-label span {
    font-weight: 400;
}

.checkbox-label:hover {
    color: var(--text-primary);
}

/* Forgot password link */
.forgot-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s;
}

.forgot-link:hover {
    text-decoration: underline;
}