* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: #111;
    color: #eee;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
}

header {
    position: sticky;
    top: 0;
    background: #000;
    border-bottom: 1px solid #2a2a2a;
    padding: env(safe-area-inset-top, 0.75rem) 1rem 0;
    z-index: 10;
}

header h1 {
    margin: 0.75rem 0 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #fff;
}

.tabs {
    display: flex;
    gap: 0.25rem;
}

.tab {
    flex: 1;
    background: transparent;
    color: #888;
    border: 0;
    border-bottom: 3px solid transparent;
    padding: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}

.tab.active {
    color: #fff;
    border-bottom-color: #f5a623;
}

main {
    padding: 1rem;
    padding-bottom: calc(env(safe-area-inset-bottom, 1rem) + 1rem);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
}

.pad {
    background: #1c1c1c;
    color: #fff;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 1rem;
    min-height: 100px;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    transition: background 0.1s, transform 0.05s;
}

.pad:active {
    background: #f5a623;
    color: #000;
    transform: scale(0.97);
}

.pad .pad-type {
    font-size: 0.7rem;
    font-weight: 500;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.pad .pad-title {
    font-size: 1rem;
    line-height: 1.25;
}

.empty {
    grid-column: 1 / -1;
    color: #666;
    text-align: center;
    padding: 2rem 0;
}

.status {
    position: fixed;
    left: 50%;
    bottom: calc(env(safe-area-inset-bottom, 1rem) + 1rem);
    transform: translateX(-50%);
    background: #1c1c1c;
    border: 1px solid #333;
    border-radius: 999px;
    padding: 0.6rem 1.25rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
    font-size: 0.9rem;
    min-width: 180px;
    text-align: center;
    z-index: 20;
}

.status.success {
    border-color: #4caf50;
    color: #a5d6a7;
}

.status.error {
    border-color: #f44336;
    color: #ef9a9a;
}

dialog {
    background: #1c1c1c;
    color: #eee;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 1.5rem;
    min-width: 280px;
    max-width: 90vw;
}

dialog::backdrop {
    background: rgba(0, 0, 0, 0.75);
}

dialog h2 {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
}

dialog p {
    margin: 0 0 0.75rem;
    color: #aaa;
    font-size: 0.85rem;
}

dialog input {
    width: 100%;
    background: #111;
    color: #eee;
    border: 1px solid #333;
    border-radius: 6px;
    padding: 0.6rem;
    font-family: "SF Mono", Menlo, monospace;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

dialog button {
    background: #f5a623;
    color: #000;
    border: 0;
    border-radius: 6px;
    padding: 0.55rem 1.5rem;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
}
