:root {
    --default-bg: #dfdfdf;
    --default-fg: #171717;
    --button-bg:  #333;
    --button-fg:  #eee;
    --device-card-left-margin: 3.5rem;
}

* {
    box-sizing: border-box;
    color: var(--default-fg);
}

body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    background: var(--default-bg);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

@font-face {
    font-family: 'Roboto';
    font-weight: normal;
    src: url('../resources/fonts/Roboto-Regular.ttf') format('truetype');
}

@font-face {
    font-family: 'Roboto';
    font-weight: bold;
    src: url('../resources/fonts/Roboto-Bold.ttf') format('truetype');
}

@font-face {
    font-family: 'Roboto';
    font-style: italic;
    src: url('../resources/fonts/Roboto-Italic.ttf') format('truetype');
}

/* main container layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

main {
    flex-grow: 1;
}

/* header & nav */
header {
    background: #333;
    color: var(--default-bg); /* inverted */
    padding: 1rem;
}

header a {
    color: var(--default-bg);
    text-decoration: none;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-brand img {
    max-height: 40px;
    max-width: 120px;
    vertical-align: middle;
}

.nav-links a {
    margin-left: 1rem;
}

.content {
    background: var(--default-bg);
    padding: 2rem;
    border-radius: 8px;
    margin-top: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    min-width: 800px;
}

.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.alert-success {
    background: #d4edda;
    color: #155724;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
}


.form-group {
    margin-bottom: 1rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

input[type="text"],
input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

button,
.btn {
    background: var(--button-bg);
    color: var(--button-fg);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    text-decoration: none;
    display: inline-block;
}

button:hover,
.btn:hover {
    background: #555;
}

.btn-danger {
    background: #d9534f;
    color: white;
}

.btn-danger:hover {
    background: #c9302c;
}

.device-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    min-width: 70%;
}

.device-card {
    border: 2px solid #333;
    border-radius: 8px;
    padding: 1rem;
    position: relative;
    cursor: pointer;
    min-height: 100px;
}

.device-card:hover {
    background: #f9f9f9;
}

.device-card .square {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 20px;
    height: 20px;
    background: #333;
}

.device-text {
    margin-left: 3.5rem;
}

.device-name, .device-text {
    margin-left: var(--device-card-left-margin);
    font-weight: bold;
    font-size: 1.2rem;
    margin-top: 1.5rem;
}

.device-id, .device-text {
    margin-left: var(--device-card-left-margin);
    color: #666;
    font-size: 0.9rem;
}

/* previously logged locations */
.location-list {
    list-style: none;
    padding: 0;
}

.location-item {
    border-bottom: 1px solid #eee;
    padding: 0.5rem 0;
}

.location-coords {
    font-family: monospace;
}

.location-time {
    color: #666;
    font-size: 0.9rem;
}

.footer {
    text-align: center;
    color: #666;
    font-size: 0.9rem;
}

/* utils */
.flex-row {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}

.no-underline {
    text-decoration: none;
}

.inherit-color {
    color: inherit;
}

