*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}
body.dark{
    background:#1c1c1e;
    color:white;
}

body.dark .card,
body.dark table,
body.dark input,
body.dark textarea,
body.dark .tabs{
    background:#2c2c2e;
    color:white;
}

body.dark th{
    background:#007AFF;
}

body.dark td{
    border-color:#444;
}
:root{
    --primary:#007AFF;
    --primary-dark:#0056b3;
    --background:#f2f2f7;
    --card:#ffffff;
    --text:#1c1c1e;
    --border:#d1d1d6;
    --danger:#ff3b30;
}

body{
    font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
    background:var(--background);
    color:var(--text);
}

.header{
    background:var(--primary);
    color:white;
    padding:20px;
    text-align:center;
    box-shadow:0 2px 6px rgba(0,0,0,.15);
}

.header h1{
    font-size:30px;
}

.tabs{
    display:flex;
    background:white;
    border-bottom:1px solid var(--border);
}

.tab{
    flex:1;
    padding:15px;
    border:none;
    background:white;
    cursor:pointer;
    font-size:16px;
    font-weight:600;
}

.tab.active{
    color:var(--primary);
    border-bottom:3px solid var(--primary);
}

.page{
    display:none;
    padding:20px;
}

.page.active{
    display:block;
}

.cards{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(170px,1fr));
    gap:15px;
    margin-top:20px;
}

.card{
    background:var(--card);
    border-radius:16px;
    padding:20px;
    box-shadow:0 3px 12px rgba(0,0,0,.08);
}

.card span{
    display:block;
    color:#666;
    margin-bottom:10px;
}

.card h3{
    font-size:28px;
}

form{
    margin-top:20px;
}

label{
    display:block;
    margin-top:15px;
    margin-bottom:6px;
    font-weight:600;
}

input,
textarea{
    width:100%;
    padding:12px;
    border-radius:10px;
    border:1px solid var(--border);
    font-size:16px;
}

textarea{
    min-height:90px;
}

button{
    background:var(--primary);
    color:white;
    border:none;
    padding:14px;
    border-radius:12px;
    cursor:pointer;
    margin-top:20px;
    font-size:16px;
}

button:hover{
    background:var(--primary-dark);
}

table{
    width:100%;
    border-collapse:collapse;
    margin-top:20px;
    background:white;
    border-radius:12px;
    overflow:hidden;
}

th{
    background:var(--primary);
    color:white;
    padding:12px;
}

td{
    padding:12px;
    border-bottom:1px solid #eee;
}

.deleteBtn{
    background:var(--danger);
}

.editBtn{
    background:#34C759;
}

.summary{
    margin-top:20px;
    background:white;
    padding:15px;
    border-radius:15px;
    box-shadow:0 2px 8px rgba(0,0,0,.08);
}

@media(max-width:700px){

.tabs{
    flex-wrap:wrap;
}

.tab{
    width:50%;
}

.cards{
    grid-template-columns:1fr;
}

table{
    font-size:14px;
}

}