body { 
    margin:0; 
    font-family:Segoe UI,Arial,sans-serif; 
    background:#f4f7fa; 
}

header { 
    background:#0a66c2; 
    color:#fff; 
    padding:18px 0; 
    text-align:center; 
    font-size:1.7em; 
    font-weight:700; 
    letter-spacing:1px; 
}

nav { 
    background:#fff; 
    box-shadow:0 2px 8px rgba(0,0,0,0.07); 
    display:flex; 
    justify-content:center; 
    gap:30px; 
    padding:12px 0; 
}

nav a { 
    color:#0a66c2; 
    text-decoration:none; 
    font-weight:600; 
    font-size:1.1em; 
    padding:6px 18px; 
    border-radius:6px; 
    transition:background 0.15s; 
}

nav a:hover { 
    background:#e3f0ff; 
}

.container {
    max-width: 1280px;
    margin: 30px auto;
}

h2 { 
    color:#0a66c2; 
    margin-top:0; 
}

.dashboard { 
    display:flex; 
    gap:30px; 
    margin-bottom:30px; 
}

.card { 
    background:#e3f0ff; 
    border-radius:8px; 
    padding:18px 24px; 
    flex:1; 
    text-align:center; 
    box-shadow:0 1px 4px rgba(0,0,0,0.06); 
}

.card span { 
    display:block; 
    font-size:2em; 
    font-weight:700; 
    margin-bottom:8px; 
}

.contacts-list { 
    width:100%; 
    border-collapse:collapse; 
    margin-bottom:30px; 
}

.contacts-list th, .contacts-list td { 
    padding:10px 12px; 
    border-bottom:1px solid #e0e0e0; 
}

.contacts-list th { 
    background:#f4f7fa; 
    color:#0a66c2; 
}

.contacts-list tr:hover { 
    background:#f1f8fe; 
}

.actions button { 
    margin-right:8px; 
}

.form-section { 
    background:#f8f9fa; 
    border-radius:8px; 
    padding:18px 24px; 
    margin-bottom:30px; 
}

label { 
    display:block; 
    margin-top:12px; 
    font-weight:500; 
}

input[type="text"], input[type="email"], input[type="tel"] {
    width:100%; 
    padding:8px; 
    margin-top:4px; 
    border:1px solid #dadce0; 
    border-radius:6px; 
    font-size:1em;
}

button, .btn { 
    background:#0a66c2; 
    color:#fff; 
    border:none; 
    border-radius:6px; 
    padding:8px 18px; 
    font-weight:600; 
    font-size:1em; 
    cursor:pointer; 
    transition:background 0.15s; 
}

button:hover, .btn:hover { 
    background:#084b8a; 
}

.hidden { 
    display:none; 
}

@media (max-width:700px) {
    .container { 
        padding:10px; 
    }
    .dashboard { 
        flex-direction:column; 
        gap:12px; 
    }
}

/* Show 5 cards per row in 1280px container */
#contactsCards {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 42px; /* Increased gap for more space between cards */
    justify-items: stretch;
    align-items: stretch;
    justify-content: center; /* Center the grid horizontally */
}

#contactsCards > div {
    background: #f8f9fa;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    padding: 24px 18px 32px 18px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-bottom: 0;
    width: 100%;
    min-width: 0;
    position: relative;
    transition: box-shadow 0.2s;
    overflow: visible;
    font-size: 0.92em;
}

.card-edit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 18px;
    margin-top: 8px;
    font-size: 0.92em;
}

.card-edit-grid label {
    font-size: 0.93em;
    color: #5f6368;
    margin-bottom: 2px;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.card-edit-grid input {
    width: 100%;
    margin-bottom: 10px;
    padding: 7px 10px;
    border-radius: 4px;
    border: 1px solid #dadce0;
    font-size: 0.95em;
    background: #f8f9fa;
    box-sizing: border-box;
    transition: border-color 0.18s, background 0.18s;
    outline: none;
}

.card-edit-grid input:focus {
    border-color: #4285f4;
    background: #e8f0fe;
}

.card-edit-actions {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 8px;
    z-index: 2;
}

.card-edit-actions span {
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(60,64,67,0.07);
    padding: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.card-edit-actions span:hover {
    background: #e8f0fe;
}

.card-edit-grid input[type="text"], .card-edit-grid input[type="email"], .card-edit-grid input[type="tel"] {
    font-family: 'Roboto', Arial, sans-serif;
}

@media (max-width:1100px) {
    #contactsCards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width:700px) {
    #contactsCards {
        grid-template-columns: 1fr;
    }
    .card-edit-grid {
        grid-template-columns: 1fr;
    }
}

/* Demo cards grid styling */
#demoCards {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 42px;
    justify-items: stretch;
    align-items: stretch;
    justify-content: center;
}

#demoCards > div {
    background: #f8f9fa;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    padding: 24px 18px 32px 18px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-bottom: 0;
    width: 100%;
    min-width: 0;
    position: relative;
    transition: box-shadow 0.2s;
    overflow: visible;
    font-size: 0.92em;
}

@media (max-width:1100px) {
    #demoCards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width:700px) {
    #demoCards {
        grid-template-columns: 1fr;
    }
}

/* Calendar styles */
.calendar-day {
    background: #fff;
    padding: 8px;
    min-height: 60px;
    border: 1px solid #e0e0e0;
    cursor: pointer;
    transition: background 0.2s;
    position: relative;
}

.calendar-day:hover {
    background: #f5f5f5;
}

.calendar-day.other-month {
    background: #f8f9fa;
    color: #999;
}

.calendar-day.today {
    background: #e3f0ff;
    font-weight: bold;
}

.calendar-day.has-demo {
    background: linear-gradient(135deg, #e8f5e8 0%, #d4edda 100%);
    border-left: 4px solid #34a853;
    border-top: 2px solid #34a853;
    position: relative;
}

.calendar-day.has-demo:hover {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    transform: scale(1.02);
    box-shadow: 0 4px 8px rgba(52, 168, 83, 0.3);
}

.demo-indicator {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #34a853;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    border: 2px solid white;
}

.demo-dot {
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: #ff6b35;
    border-radius: 50%;
    box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.demo-badge {
    position: absolute;
    top: -2px;
    left: -2px;
    background: #ff6b35;
    color: white;
    font-size: 8px;
    padding: 2px 4px;
    border-radius: 8px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.demo-trainer {
    position: absolute;
    bottom: 8px;
    left: 2px;
    right: 2px;
    background: rgba(52, 168, 83, 0.9);
    color: white;
    font-size: 9px;
    padding: 2px 4px;
    border-radius: 4px;
    font-weight: 600;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.calendar-header {
    background: #0a66c2;
    color: white;
    padding: 8px;
    text-align: center;
    font-weight: bold;
}

.demo-tooltip {
    position: absolute;
    background: #333;
    color: white;
    padding: 8px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 1000;
    max-width: 200px;
    display: none;
}

.calendar-day.has-demo::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #34a853, #2e7d32);
    border-radius: 2px 2px 0 0;
}

.calendar-day.has-demo::after {
    content: '📅';
    position: absolute;
    bottom: 2px;
    right: 2px;
    font-size: 12px;
    opacity: 0.7;
}

@keyframes demoPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.calendar-day.has-demo:hover .demo-indicator {
    animation: demoPulse 0.6s ease-in-out;
}

/* Styles for demo indicators in other months */
.calendar-day.has-demo-other-month {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border-left: 3px solid #ff9800;
    border-top: 2px solid #ff9800;
}

.calendar-day.has-demo-other-month:hover {
    background: linear-gradient(135deg, #ffe0b2 0%, #ffcc80 100%);
    transform: scale(1.02);
    box-shadow: 0 4px 8px rgba(255, 152, 0, 0.3);
}

.demo-indicator-other {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #ff9800;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    border: 2px solid white;
}

.demo-dot-other {
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 5px;
    height: 5px;
    background: #ff5722;
    border-radius: 50%;
    box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
