/* Iron Forged Customer (mobile) — m.css */

body.m-app {
    background: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
    -webkit-tap-highlight-color: transparent;
}

.m-main {
    max-width: 480px;
    margin: 0 auto;
    padding: 16px 16px 90px; /* leave room for bottom nav */
}

/* Login */
.m-login { padding-top: 32px; }
.m-login-brand { text-align: center; margin-bottom: 32px; }
.m-login-brand img { width: 96px; height: auto; }
.m-login-title {
    font-family: var(--font-brand);
    font-size: 2rem;
    letter-spacing: 0.18em;
    margin-top: 12px;
}

.m-form { display: flex; flex-direction: column; gap: 16px; }
.m-field { display: flex; flex-direction: column; gap: 6px; }
.m-field span {
    font-family: var(--font-brand);
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    color: var(--text-dim);
}
.m-field input {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px 16px;
    font-size: 16px;
    min-height: 44px;
}
.m-field input:focus { outline: 2px solid var(--blue); }

.m-btn {
    border: none;
    border-radius: 8px;
    padding: 14px;
    font-family: var(--font-brand);
    font-size: 1.1rem;
    letter-spacing: 0.12em;
    min-height: 48px;
    cursor: pointer;
}
.m-btn-primary { background: var(--text); color: var(--bg); }
.m-btn-outline { background: transparent; color: var(--text); border: 1px solid var(--border); }
.m-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.m-help {
    margin-top: 24px;
    font-size: 0.85rem;
    color: var(--text-dim);
    text-align: center;
}

.m-alert {
    background: rgba(244, 67, 54, 0.12);
    color: var(--red);
    border: 1px solid var(--red);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
    font-size: 0.9rem;
}

/* Header / greeting */
.m-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0 24px;
}
.m-greeting { flex: 1; }
.m-hello {
    font-family: var(--font-brand);
    font-size: 1.6rem;
    letter-spacing: 0.06em;
}
.m-plan { color: var(--text-dim); font-size: 0.9rem; margin-top: 2px; }
.m-header-logo { width: 48px; height: auto; opacity: 0.85; }

/* Card */
.m-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}
.m-card-title {
    font-family: var(--font-brand);
    letter-spacing: 0.18em;
    color: var(--text-dim);
    font-size: 0.8rem;
    margin-bottom: 12px;
}

/* Stats */
.m-stat-row { display: flex; gap: 16px; }
.m-stat { flex: 1; }
.m-stat-num {
    font-family: var(--font-brand);
    font-size: 2.4rem;
    line-height: 1;
}
.m-stat-label {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-top: 4px;
}

/* Class lists */
.m-class-list, .m-history-list {
    list-style: none;
    padding: 0;
    margin: 0 0 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.m-class-item, .m-history-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: var(--surface-light);
    border-radius: 8px;
}
.m-class-color {
    width: 6px;
    height: 32px;
    border-radius: 3px;
    flex-shrink: 0;
}
.m-class-info, .m-history-info { flex: 1; min-width: 0; }
.m-class-name, .m-history-class {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.m-class-time, .m-history-date {
    font-size: 0.85rem;
    color: var(--text-dim);
}

.m-link {
    color: var(--blue);
    text-decoration: none;
    font-size: 0.9rem;
}
.m-dim { color: var(--text-dim); }

/* Bottom nav */
.m-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 8px env(safe-area-inset-right) calc(8px + env(safe-area-inset-bottom)) env(safe-area-inset-left);
    z-index: 10;
}
.m-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    text-decoration: none;
    color: var(--text-dim);
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    padding: 6px 12px;
    min-width: 64px;
}
.m-nav a.active { color: var(--text); }
.m-nav-icon { font-size: 1.3rem; }

/* Schedule */
.m-schedule-week {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    margin-bottom: 8px;
}
.m-schedule-week button {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 14px;
    font-family: var(--font-brand);
    letter-spacing: 0.1em;
    cursor: pointer;
}
.m-day-block { margin-bottom: 16px; }
.m-day-name {
    font-family: var(--font-brand);
    letter-spacing: 0.18em;
    color: var(--text-dim);
    font-size: 0.85rem;
    margin-bottom: 8px;
    padding-left: 4px;
}
.m-day-name.today { color: var(--text); }
.m-day-name.today::after { content: " · TODAY"; color: var(--blue); }
.m-class-cell {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 8px;
    display: grid;
    grid-template-columns: 6px 1fr auto;
    gap: 12px;
    align-items: center;
}
.m-class-cell .m-class-color { height: 100%; min-height: 32px; }
.m-fill-bar {
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 6px;
}
.m-fill-bar-fill {
    height: 100%;
    transition: width 0.3s;
}
.m-fill-low { background: var(--green); }
.m-fill-mid { background: var(--orange); }
.m-fill-high { background: var(--red); }
.m-fill-text {
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-top: 4px;
}
.m-fill-text.full { color: var(--red); font-weight: 600; }

.m-reserve-btn {
    background: var(--blue);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    font-family: var(--font-brand);
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    cursor: pointer;
    min-height: 36px;
}
.m-reserve-btn.reserved { background: var(--green); }
.m-reserve-btn:disabled { background: var(--border); color: var(--text-dim); cursor: not-allowed; }

/* Install banner */
.m-install[hidden] { display: none !important; }
.m-install {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--surface-light);
    border-bottom: 1px solid var(--border);
    padding: 12px 16px;
    position: sticky;
    top: 0;
    z-index: 20;
}
.m-install-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}
.m-install-text strong {
    font-family: var(--font-brand);
    letter-spacing: 0.08em;
    font-size: 1rem;
}
.m-install-text span {
    font-size: 0.8rem;
    color: var(--text-dim);
}
.m-btn-sm {
    min-height: 36px;
    padding: 8px 14px;
    font-size: 0.9rem;
}
.m-install-x {
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px 8px;
}
.m-msg-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.m-msg-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border, #222);
}
.m-msg-item:last-child {
    border-bottom: none;
}
.m-msg-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}
.m-msg-body {
    font-size: 0.95rem;
    line-height: 1.4;
    margin-bottom: 0.25rem;
    white-space: pre-wrap;
}
.m-msg-meta {
    font-size: 0.8rem;
    color: var(--text-dim);
}
