:root {
    --primary-blue: #24629F;
    --dark-blue: #164574;
    --accent-orange: #F58220;
    --bg-dark: #0F172A;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-light: #F8FAFC;
    --text-muted: #94A3B8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    background-image:
        radial-gradient(at 0% 0%, rgba(36, 98, 159, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(245, 130, 32, 0.1) 0px, transparent 50%);
}

.app-container {
    width: 100%;
    max-width: 480px;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Glow Orbs */
.glow-orb {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.3;
}

.orb-1 {
    top: -50px;
    left: -50px;
    background: var(--primary-blue);
}

.orb-2 {
    bottom: -50px;
    right: -50px;
    background: var(--accent-orange);
}

/* Glass Cards */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
}

header {
    margin-top: 10px;
}

.logo-card {
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.help-circle-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.help-circle-btn i {
    width: 24px;
    height: 24px;
}

.logo-svg {
    height: 40px;
}

/* Status Indicator */
.status-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(74, 222, 128, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(74, 222, 128, 0);
    }
}

/* Main Button */
.clock-in-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.main-button {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    border: none;
    background: radial-gradient(circle, var(--accent-orange) 0%, #d46b18 100%);
    box-shadow: 0 0 40px rgba(245, 130, 32, 0.4), inset 0 0 20px rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.main-button:active:not(:disabled) {
    transform: scale(0.9);
    box-shadow: 0 0 20px rgba(245, 130, 32, 0.6);
}

.main-button:disabled {
    filter: grayscale(0.8);
    opacity: 0.5;
    cursor: not-allowed;
}

.button-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.btn-icon {
    width: 60px;
    height: 60px;
    stroke-width: 1.5;
}

.btn-text {
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 1px;
}

.hint-text {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Location Card */
.location-card {
    text-align: center;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 15px;
    color: var(--text-muted);
}

.card-header h3 {
    font-size: 0.8rem;
    letter-spacing: 1.5px;
}

.map-placeholder {
    height: 100px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    border: 1px dashed var(--glass-border);
}

#distance-info {
    font-size: 1.4rem;
    font-weight: 700;
    color: #4ade80;
}

#coords {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.location-label {
    font-size: 0.9rem;
    font-weight: 600;
}

/* Bottom Nav */
footer {
    padding-bottom: 10px;
}

.bottom-nav {
    display: flex;
    justify-content: space-around;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 12px;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.7rem;
    gap: 4px;
    transition: color 0.3s;
}

.nav-item i {
    width: 20px;
    height: 20px;
}

.nav-item.active {
    color: var(--accent-orange);
}

/* Toast */
.toast {
    position: fixed;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    transition: all 0.3s ease;
}

.toast.hidden {
    top: -100px;
    opacity: 0;
    pointer-events: none;
}

.toast-content {
    background: white;
    color: black;
    padding: 12px 24px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.toast.success .toast-content {
    background: #4ade80;
    color: #064e3b;
}

.toast.error .toast-content {
    background: #f87171;
    color: #7f1d1d;
}

.toast.info .toast-content {
    background: #3b82f6;
    color: #ffffff;
}

/* History Styles */
.history-list.hidden {
    display: none;
}

.history-items {
    max-height: 300px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border-left: 4px solid var(--accent-orange);
}

.history-item.valid {
    border-left-color: #4ade80;
}

.history-item.invalid {
    border-left-color: #f87171;
}

.hist-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hist-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.hist-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.hist-dist {
    font-size: 0.8rem;
    font-weight: 700;
    color: #4ade80;
}

.history-item.invalid .hist-dist {
    color: #f87171;
}

.hidden {
    display: none !important;
}

/* Team Management Styles */
.add-user-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.add-user-form input,
.add-user-form select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 12px;
    color: white;
    font-family: 'Montserrat';
    outline: none;
}

.secondary-button {
    background: var(--primary-blue);
    border: none;
    border-radius: 12px;
    padding: 12px;
    color: white;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.3s;
}

.secondary-button:active {
    opacity: 0.8;
}

.team-items {
    max-height: 300px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.team-member {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid var(--glass-border);
}

.member-info {
    display: flex;
    flex-direction: column;
}

.member-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.member-level {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.member-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn i {
    width: 16px;
    height: 16px;
}

.action-btn.copy:hover {
    border-color: var(--accent-orange);
    color: var(--accent-orange);
}

.action-btn.edit:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}

.action-btn.delete:hover {
    border-color: #f87171;
    color: #f87171;
}

/* Modals */
.modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-glass {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 30px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.modal h3 {
    margin-bottom: 20px;
    text-align: center;
}

.help-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.help-list li {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.help-list i {
    color: var(--accent-orange);
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}