* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}

body {
    background: #0f172a;
    color: #fff;
    padding: 15px;
}

.container {
    max-width: 500px;
    margin: auto;
}

h1 {
    text-align: center;
    font-size: 28px;
    margin: 20px 0;
}

.card {
    background: #1e293b;
    padding: 18px;
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,.3);
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

label {
    font-size: 15px;
    font-weight: bold;
}

input {
    height: 52px;
    border: none;
    outline: none;
    border-radius: 12px;
    padding: 0 15px;
    font-size: 18px;
    background: #334155;
    color: white;
}

input::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

button {
    height: 55px;
    border: none;
    border-radius: 14px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: .25s;
}

#addBtn {
    background: #2563eb;
    color: white;
}

#addBtn:hover {
    background: #1d4ed8;
}




.summary {
    margin: 25px 0;
    background: #1e293b;
    padding: 20px;
    border-radius: 18px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,.3);
}

.summary h2 {
    font-size: 18px;
    margin-bottom: 10px;
}

#totalHours {
    font-size: 40px;
    font-weight: bold;
    color: #22c55e;
}

.table {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.table-header,
.row {
    display: grid;
    grid-template-columns: 1.2fr .8fr .8fr .8fr 50px;
    gap: 8px;
    align-items: center;
    background: #1e293b;
    padding: 14px;
    border-radius: 14px;
}

.table-header {
    font-weight: bold;
    background: #2563eb;
}

.row {
    font-size: 15px;
}

.actions {
    display: flex;
    justify-content: center;
}

.delete {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 10px;
    background: #ef4444;
    color: white;
    font-size: 18px;
    cursor: pointer;
}

.delete:hover {
    background: #dc2626;
}

.danger {
    margin-top: 25px;
    width: 100%;
    background: #b91c1c;
    color: white;
}

.danger:hover {
    background: #991b1b;
}

@media (max-width: 520px) {
    body {
        padding: 10px;
    }

    h1 {
        font-size: 24px;
    }

    .table-header {
        display: none;
    }

    .row {
        grid-template-columns: 1fr;
        gap: 6px;
        padding: 16px;
    }

    .row div {
        display: flex;
        justify-content: space-between;
        padding: 4px 0;
    }

    .row div:nth-child(1)::before { content: "Дата"; }
    .row div:nth-child(2)::before { content: "С"; }
    .row div:nth-child(3)::before { content: "До"; }
    .row div:nth-child(4)::before { content: "Часы"; }

    .actions {
        justify-content: flex-end;
        margin-top: 8px;
    }

    button {
        height: 52px;
    }

    input {
        font-size: 17px;
    }

    #totalHours {
        font-size: 34px;
    }
}