* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f3f4f6;
    color: #111827;
}

.container {
    width: min(1100px, calc(100% - 30px));
    margin: 30px auto;
    background: #ffffff;
    border-radius: 12px;
    padding: 28px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
}

.container.narrow { max-width: 650px; }

.topbar,
.section-head,
.resume-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.resume-toolbar {
    width: min(900px, calc(100% - 30px));
    margin: 24px auto 0;
}

h1, h2, h3 { margin-top: 0; }
p { color: #4b5563; }

.card {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 18px;
    background: #fff;
}

.grid.two {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

label {
    display: block;
    margin: 10px 0 6px;
    font-weight: 700;
    font-size: 14px;
}

input,
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font: inherit;
    background: #fff;
}

textarea { min-height: 105px; resize: vertical; }
small { color: #6b7280; }

.btn,
button.btn,
.resume-actions a {
    display: inline-block;
    background: #111827;
    color: #ffffff;
    padding: 11px 16px;
    border: 0;
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
    font-weight: 700;
}

.btn.secondary { background: #6b7280; }
.btn.danger { background: #dc2626; }
.btn.small { padding: 8px 11px; font-size: 13px; }

.dynamic-box {
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 12px;
}

.dynamic-box input,
.dynamic-box textarea { margin-bottom: 10px; }

.sticky-actions {
    position: sticky;
    bottom: 0;
    background: #ffffff;
    padding: 14px 0 0;
    border-top: 1px solid #e5e7eb;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

th, td {
    border-bottom: 1px solid #e5e7eb;
    padding: 12px;
    text-align: left;
    vertical-align: top;
}

th { background: #f9fafb; }

a { color: #111827; font-weight: 700; }

.empty,
.alert {
    padding: 14px;
    border-radius: 8px;
    margin: 14px 0;
}
.empty { background: #f9fafb; border: 1px solid #e5e7eb; }
.alert.success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.alert.error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

.resume-template {
    width: min(900px, calc(100% - 30px));
    margin: 24px auto 40px;
    background: #ffffff;
    padding: 44px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
}

.resume-header {
    text-align: center;
    border-bottom: 2px solid #111827;
    padding-bottom: 18px;
    margin-bottom: 24px;
}

.resume-header h1 { margin-bottom: 6px; font-size: 34px; }
.resume-header h3 { margin-bottom: 8px; color: #374151; }
.resume-header p { margin: 5px 0; }

.resume-template section { margin-top: 24px; }
.resume-template h2 {
    border-bottom: 1px solid #d1d5db;
    padding-bottom: 6px;
    margin-bottom: 12px;
}
.resume-item { margin-bottom: 14px; }
.resume-item h3 { margin-bottom: 3px; }

@media (max-width: 700px) {
    .grid.two { grid-template-columns: 1fr; }
    .container, .resume-template { padding: 20px; }
}
