* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f5f5;
    color: #333;
}

nav {
    background: #1a1a2e;
    color: white;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    height: 56px;
    gap: 2rem;
}

.nav-brand { font-weight: 700; font-size: 1.2rem; }
.nav-links { display: flex; gap: 1rem; flex: 1; }
.nav-links a { color: #aaa; text-decoration: none; padding: 0.5rem; }
.nav-links a:hover, .nav-links a.active { color: white; }
.nav-user { font-size: 0.85rem; color: #aaa; }
.nav-user a { color: #aaa; margin-left: 1rem; }

main { max-width: 960px; margin: 2rem auto; padding: 0 1rem; }

.login-container {
    text-align: center;
    margin-top: 20vh;
}

.login-container h1 { font-size: 2.5rem; margin-bottom: 0.5rem; }
.login-container p { color: #666; margin-bottom: 2rem; }

.google-login-btn {
    display: inline-block;
    background: #4285f4;
    color: white;
    padding: 12px 24px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 1rem;
}

.google-login-btn:hover { background: #3367d6; }

/* Forms */
form { background: white; padding: 2rem; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
label { display: block; font-weight: 600; margin-bottom: 0.25rem; margin-top: 1rem; }
input[type="text"], input[type="email"], input[type="password"], select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.5rem;
    margin: 1rem 0;
}

.checkbox-grid label { font-weight: normal; display: flex; align-items: center; gap: 0.5rem; }

button, .btn {
    display: inline-block;
    padding: 10px 20px;
    background: #4285f4;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    text-decoration: none;
    margin-top: 1rem;
}

button:hover, .btn:hover { background: #3367d6; }
.btn-danger { background: #dc3545; }
.btn-danger:hover { background: #c82333; }
.btn-sm { padding: 4px 12px; font-size: 0.85rem; margin-top: 0; }

/* Tables */
table { width: 100%; border-collapse: collapse; background: white; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid #eee; }
th { background: #f8f9fa; font-weight: 600; }

/* Results */
.results { margin-top: 1.5rem; }
.result-item { padding: 8px 12px; margin: 4px 0; border-radius: 4px; }
.result-created { background: #d4edda; color: #155724; }
.result-exists { background: #fff3cd; color: #856404; }
.result-failed { background: #f8d7da; color: #721c24; }

/* Messages */
.messages { margin-bottom: 1rem; }
.message { padding: 12px; border-radius: 4px; margin-bottom: 0.5rem; }
.message.success { background: #d4edda; color: #155724; }
.message.error { background: #f8d7da; color: #721c24; }

/* Status badges */
.badge { padding: 2px 8px; border-radius: 12px; font-size: 0.8rem; }
.badge-active { background: #d4edda; color: #155724; }
.badge-inactive { background: #e2e3e5; color: #383d41; }

/* Date inputs */
input[type="date"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

/* Fieldsets */
fieldset {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
}

legend {
    font-weight: 700;
    font-size: 1.05rem;
    padding: 0 0.5rem;
    color: #1a1a2e;
}

/* Certificate rows */
.cert-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.5rem;
}

.cert-row select, .cert-row input {
    width: 100%;
}

/* Integration checkboxes with logos */
.integration-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    margin-top: 0.75rem;
    background: #fafafa;
    cursor: pointer;
    transition: border-color 0.15s;
}

.integration-option:hover {
    border-color: #4285f4;
}

.integration-option input[type="checkbox"] {
    margin: 0;
}

.integration-option .integration-logo {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
}

.integration-option .integration-label {
    font-weight: 600;
    font-size: 0.95rem;
}

/* Duplicate warning */
.duplicate-warning {
    background: #fff3cd;
    color: #856404;
    padding: 8px 12px;
    border-radius: 4px;
    margin-top: 0.5rem;
    font-size: 0.9rem;
}
